All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 2/3] tst_netlink: inline functions in header
Date: Thu,  6 Dec 2018 10:18:13 -0800	[thread overview]
Message-ID: <20181206181814.85583-3-ebiggers@kernel.org> (raw)
In-Reply-To: <20181206181814.85583-1-ebiggers@kernel.org>

From: Eric Biggers <ebiggers@google.com>

safe_netlink_send() and safe_netlink_recv() need to be static inline,
since they're defined in a .h file.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 include/tst_netlink.h | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/include/tst_netlink.h b/include/tst_netlink.h
index 42232a169..892ef8f78 100644
--- a/include/tst_netlink.h
+++ b/include/tst_netlink.h
@@ -33,9 +33,9 @@
 #endif
 
 /** @private */
-ssize_t safe_netlink_send(const char *file, const int lineno,
-			  int fd, const struct nlmsghdr *nh,
-			  const void *payload)
+static inline ssize_t safe_netlink_send(const char *file, const int lineno,
+					int fd, const struct nlmsghdr *nh,
+					const void *payload)
 {
 	struct sockaddr_nl sa = { .nl_family = AF_NETLINK };
 	struct iovec iov[2] = {
@@ -68,8 +68,9 @@ ssize_t safe_netlink_send(const char *file, const int lineno,
 	safe_netlink_send(__FILE__, __LINE__, fd, nl_header, payload)
 
 /** @private */
-ssize_t safe_netlink_recv(const char *file, const int lineno,
-			  int fd, char *nl_headers_buf, size_t buf_len)
+static inline ssize_t safe_netlink_recv(const char *file, const int lineno,
+					int fd, char *nl_headers_buf,
+					size_t buf_len)
 {
 	struct iovec iov = { nl_headers_buf, buf_len };
 	struct sockaddr_nl sa;
-- 
2.20.0.rc1.387.gf8505762e3-goog


  parent reply	other threads:[~2018-12-06 18:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-06 18:18 [LTP] [PATCH 0/3] ltp: new test for crypto_user information leak bug Eric Biggers
2018-12-06 18:18 ` [LTP] [PATCH 1/3] lapi/cryptouser.h: add more declarations Eric Biggers
2018-12-06 18:18 ` Eric Biggers [this message]
2018-12-06 18:18 ` [LTP] [PATCH 3/3] crypto/crypto_user01.c: new test for information leak bug Eric Biggers
2018-12-07 14:11   ` Richard Palethorpe
2018-12-10 12:24     ` Cyril Hrubis
2018-12-11  5:40     ` Eric Biggers
2018-12-07 14:30   ` Richard Palethorpe
2018-12-07 16:34     ` Petr Vorel
2018-12-10  8:59       ` Richard Palethorpe
2018-12-11  5:37         ` Eric Biggers
2018-12-11 10:55           ` Petr Vorel
2018-12-10 12:38   ` Cyril Hrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181206181814.85583-3-ebiggers@kernel.org \
    --to=ebiggers@kernel.org \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.