diff --git a/libpromises/conversion.c b/libpromises/conversion.c index 71c5f87312..bf9be81bf3 100644 --- a/libpromises/conversion.c +++ b/libpromises/conversion.c @@ -957,7 +957,7 @@ static void AddSimpleUidItem(UidList ** uidlist, uid_t uid, char *uidname) ulp->uid = uid; - if (uid == CF_UNKNOWN_OWNER && uidname != NULL) /* unknown user */ + if (uid == CF_UNKNOWN_OWNER) /* unknown user */ { ulp->uidname = xstrdup(uidname); } @@ -1019,7 +1019,7 @@ static void AddSimpleGidItem(GidList ** gidlist, gid_t gid, char *gidname) glp->gid = gid; - if (gid == CF_UNKNOWN_GROUP && gidname != NULL) /* unknown group */ + if (gid == CF_UNKNOWN_GROUP) /* unknown group */ { glp->gidname = xstrdup(gidname); } diff --git a/tests/static-check/run_checks.sh b/tests/static-check/run_checks.sh index f5bc3319a3..809583ed64 100755 --- a/tests/static-check/run_checks.sh +++ b/tests/static-check/run_checks.sh @@ -4,6 +4,9 @@ set -x n_procs="$(getconf _NPROCESSORS_ONLN)" use_procs=$((n_procs/2)) +if [ "$use_procs" -lt "0" ]; then + use_procs=1 +fi function check_with_gcc() { # previous runs may have cached configuration based on a different CC @@ -60,6 +63,9 @@ if [ ! -f configure ]; then NO_CONFIGURE=1 ./autogen.sh --enable-debug fi +echo "confirm version of codebase with git log -1" +git log -1 + check_with_gcc || { failures="${failures}FAIL: GCC check failed\n"; failure=1; } check_with_clang || { failures="${failures}FAIL: Clang check failed\n"; failure=1; } check_with_cppcheck || { failures="${failures}FAIL: cppcheck failed\n"; failure=1; }