Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions libpromises/conversion.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
}
Expand Down
6 changes: 6 additions & 0 deletions tests/static-check/run_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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; }
Expand Down
Loading