summaryrefslogtreecommitdiff
path: root/src/nspawn/nspawn.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-05-25 22:27:14 +0200
committerTom Gundersen <teg@jklm.no>2015-05-25 22:27:29 +0200
commitf001a83522284bc85c1fdc352229e58316ce0e16 (patch)
treed3444517efc10b45fbdb3e83d9a12661905039fd /src/nspawn/nspawn.c
parent01d28f81a782616b6daa84a42447fd4939783a66 (diff)
nspawn: make coverity happy
Rather than checking the return of asprintf() we are checking if buf gets allocated, make it clear that it is ok to ignore the return value. Fixes CID 1299644.
Diffstat (limited to 'src/nspawn/nspawn.c')
-rw-r--r--src/nspawn/nspawn.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 646edea700..a0eece6ba9 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -1026,9 +1026,9 @@ static int tmpfs_patch_options(const char *options, char **ret) {
if (arg_userns && arg_uid_shift != 0) {
if (options)
- asprintf(&buf, "%s,uid=" UID_FMT ",gid=" UID_FMT, options, arg_uid_shift, arg_uid_shift);
+ (void) asprintf(&buf, "%s,uid=" UID_FMT ",gid=" UID_FMT, options, arg_uid_shift, arg_uid_shift);
else
- asprintf(&buf, "uid=" UID_FMT ",gid=" UID_FMT, arg_uid_shift, arg_uid_shift);
+ (void) asprintf(&buf, "uid=" UID_FMT ",gid=" UID_FMT, arg_uid_shift, arg_uid_shift);
if (!buf)
return -ENOMEM;