diff options
author | Jan Pokorný <jpokorny@redhat.com> | 2015-03-19 18:05:58 +0100 |
---|---|---|
committer | Jan Pokorný <jpokorny@redhat.com> | 2015-03-20 17:41:44 +0100 |
commit | b229425f72e014619d0a61681e0280a854c45a63 (patch) | |
tree | 1fae31afed2011c494fae5c90d2a75f9b693008d /__root__/ccs-flatten | |
parent | 67477999b0a973d48c5d2d58c4c97fb9add336bb (diff) | |
download | clufter-b229425f72e014619d0a61681e0280a854c45a63.tar.gz clufter-b229425f72e014619d0a61681e0280a854c45a63.tar.xz clufter-b229425f72e014619d0a61681e0280a854c45a63.zip |
ccs-flatten/list.h: spare extra checks (per rgmanager upstream)
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to '__root__/ccs-flatten')
-rw-r--r-- | __root__/ccs-flatten/list.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/__root__/ccs-flatten/list.h b/__root__/ccs-flatten/list.h index d77a2a0..77f71e9 100644 --- a/__root__/ccs-flatten/list.h +++ b/__root__/ccs-flatten/list.h @@ -78,14 +78,14 @@ list_do(list, node) { * there must be at least one item in the list */ # define list_for(list, curr, cnt) \ - if (!(cnt=0) && (list != NULL) && (*list != NULL)) \ + if (!(cnt=0) && *list) \ for (curr = *list; \ (cnt == 0) || (curr != *list); \ curr = (void*)le(curr)->le_next, \ cnt++) # define list_for_rev(list, curr, cnt) \ - if (!(cnt=0) && list && *list) \ + if (!(cnt=0) && *list) \ for (curr = (void *)(le(*list)->le_prev); \ (cnt == 0) || ((void *)curr != le(*list)->le_prev); \ curr = (void*)(le(curr)->le_prev), \ |