aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/datagram.c
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2019-03-25 09:17:23 -0700
committerDavid S. Miller <davem@davemloft.net>2019-03-27 13:49:44 -0700
commit7b7ed885aff2eede24d641c3b042ebcf7517a5c5 (patch)
tree97c9dd78b5eeaf2b43636b3a1b9618e3400b407d /net/core/datagram.c
parentnet/core: Fix rtnetlink kernel-doc headers (diff)
downloadlinux-dev-7b7ed885aff2eede24d641c3b042ebcf7517a5c5.tar.xz
linux-dev-7b7ed885aff2eede24d641c3b042ebcf7517a5c5.zip
net/core: Allow the compiler to verify declaration and definition consistency
Instead of declaring a function in a .c file, declare it in a header file and include that header file from the source files that define and that use the function. That allows the compiler to verify consistency of declaration and definition. See also commit 52267790ef52 ("sock: add MSG_ZEROCOPY") # v4.14. Cc: Willem de Bruijn <willemb@google.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/datagram.c')
-rw-r--r--net/core/datagram.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/core/datagram.c b/net/core/datagram.c
index ed8accb17418..0dafec5cada0 100644
--- a/net/core/datagram.c
+++ b/net/core/datagram.c
@@ -61,6 +61,8 @@
#include <trace/events/skb.h>
#include <net/busy_poll.h>
+#include "datagram.h"
+
/*
* Is a socket 'connection oriented' ?
*/