chiark / gitweb /
build-sys: minor fixes found with cppcheck
authorLennart Poettering <lennart@poettering.net>
Wed, 25 Dec 2013 18:00:12 +0000 (19:00 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 25 Dec 2013 18:00:38 +0000 (19:00 +0100)
Makefile.am
src/cgtop/cgtop.c
src/core/dbus-cgroup.c
src/core/execute.c

index b7a4681447f14532a4ef7a9ea80db1cd22e6cf75..162a7be45e351cd54d593e91a4fbf70e148ce555 100644 (file)
@@ -5013,4 +5013,4 @@ tests += \
        test-libudev-sym
 
 cppcheck:
        test-libudev-sym
 
 cppcheck:
-       cppcheck --enable=all $(top_srcdir)
+       cppcheck --enable=all -q $(top_srcdir)
index e5fc262357c3aad3b517414ff894eef073d4f1bf..c56f7a861f51a48fca5c53eaf68454aa6f34f69b 100644 (file)
@@ -563,7 +563,7 @@ static int help(void) {
                "  -d --delay=DELAY    Delay between updates\n"
                "  -n --iterations=N   Run for N iterations before exiting\n"
                "  -b --batch          Run in batch mode, accepting no input\n"
                "  -d --delay=DELAY    Delay between updates\n"
                "  -n --iterations=N   Run for N iterations before exiting\n"
                "  -b --batch          Run in batch mode, accepting no input\n"
-               "     --depth=DEPTH    Maximum traversal depth (default: %d)\n",
+               "     --depth=DEPTH    Maximum traversal depth (default: %u)\n",
                program_invocation_short_name, arg_depth);
 
         return 0;
                program_invocation_short_name, arg_depth);
 
         return 0;
index 39865a96da7d0e5e44c7fed2b163222ed17581ea..861bb16445ed718962112cac254a4f694809f32d 100644 (file)
@@ -484,6 +484,8 @@ int bus_cgroup_set_property(
 
                         n++;
                 }
 
                         n++;
                 }
+                if (r < 0)
+                        return r;
 
                 if (mode != UNIT_CHECK) {
                         _cleanup_free_ char *buf = NULL;
 
                 if (mode != UNIT_CHECK) {
                         _cleanup_free_ char *buf = NULL;
index 9b33ec0ec5efbefec0002bd00dc20be8e825d328..6ae9a5eb71ebb0c54816879cf3989d058c922fd9 100644 (file)
@@ -1974,7 +1974,7 @@ void exec_context_dump(ExecContext *c, FILE* f, const char *prefix) {
                 fprintf(f, "%sCPUAffinity:", prefix);
                 for (i = 0; i < c->cpuset_ncpus; i++)
                         if (CPU_ISSET_S(i, CPU_ALLOC_SIZE(c->cpuset_ncpus), c->cpuset))
                 fprintf(f, "%sCPUAffinity:", prefix);
                 for (i = 0; i < c->cpuset_ncpus; i++)
                         if (CPU_ISSET_S(i, CPU_ALLOC_SIZE(c->cpuset_ncpus), c->cpuset))
-                                fprintf(f, " %i", i);
+                                fprintf(f, " %u", i);
                 fputs("\n", f);
         }
 
                 fputs("\n", f);
         }