summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-09-23 01:44:36 +0200
committerLennart Poettering <lennart@poettering.net>2011-09-23 01:45:34 +0200
commitf8440af5febb18ddfd2bc7a94b771284f0b7b310 (patch)
tree83172e88ffe4251d3fe7765a1f5874e1a5135f1a /src/util.c
parent8ea913b2eaadbd92e069ea6b71cc5f5df409decf (diff)
coverity: change a few things so that coverity doesn't show so many false positives
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/util.c b/src/util.c
index 6a9fffbf3d..2eb6ba74fc 100644
--- a/src/util.c
+++ b/src/util.c
@@ -782,13 +782,7 @@ int read_full_file(const char *fn, char **contents, size_t *size) {
}
}
- if (buf)
- buf[l] = 0;
- else if (!(buf = calloc(1, 1))) {
- r = -errno;
- goto finish;
- }
-
+ buf[l] = 0;
*contents = buf;
buf = NULL;