]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
include: fix spurious list.h warnings
authorSami Kerola <kerolasa@iki.fi>
Sun, 10 Jun 2012 09:09:08 +0000 (11:09 +0200)
committerSami Kerola <kerolasa@iki.fi>
Mon, 11 Jun 2012 17:51:35 +0000 (19:51 +0200)
include/list.h:224:17: warning: ISO C forbids omitting the middle term of a ?: expression [-pedantic]
include/list.h:255:19: warning: ISO C forbids omitting the middle term of a ?: expression [-pedantic]

Compilation warned about that at least 110 times.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
include/list.h

index d8c3bf018c20ec3f6fe4338153cc7193b4cfd37c..1824af05d296a6bf3b1a59e5cf66a457a790610c 100644 (file)
@@ -221,7 +221,7 @@ _INLINE_ struct list_head *merge(int (*cmp)(struct list_head *a,
                }
                tail = tail->next;
        }
-       tail->next = a?:b;
+       tail->next = a ? a : b;
        return head.next;
 }
 
@@ -252,7 +252,7 @@ _INLINE_ void merge_and_restore_back_links(int (*cmp)(struct list_head *a,
                }
                tail = tail->next;
        }
-       tail->next = a ? : b;
+       tail->next = a ? : b;
 
        do {
                /*