summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2022-03-25 18:33:55 +0100
committerPhil Sutter <phil@nwl.cc>2022-03-29 23:33:17 +0200
commit90ba6791824ef761f9f397c05b20a2f102dbe74a (patch)
tree26c69f6a5627f4f62b1a4047cd3dc1294d96064e
parentbb4f6c8ef3a5282dc7ee04b6e731029fbca9e03b (diff)
downloadlibnfnetlink-90ba6791824ef761f9f397c05b20a2f102dbe74a.tar.gz
include: Silence gcc warning in linux_list.h
Compiler complained about empty prefetch() macro: | ../include/linux_list.h:385:66: warning: right-hand operand of comma expression has no effect [-Wunused-value] | 385 | for (pos = list_entry((head)->next, typeof(*pos), member), \ | | ^ Use nftables' variant instead which gcc seems to like more. Fixes: 36d2ed3de20a3 ("major cleanup of index2name infrastructure: use linux list (and fix leak in the nlif_close path)") Signed-off-by: Phil Sutter <phil@nwl.cc>
-rw-r--r--include/linux_list.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux_list.h b/include/linux_list.h
index de182a4..cf71837 100644
--- a/include/linux_list.h
+++ b/include/linux_list.h
@@ -29,7 +29,7 @@
1; \
})
-#define prefetch(x) 1
+#define prefetch(x) ((void)0)
/* empty define to make this work in userspace -HW */
#ifndef smp_wmb