linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] 9p: safer definition of P9_NOTAG and P9_NOFID
@ 2016-12-14  8:20 Greg Kurz
  0 siblings, 0 replies; only message in thread
From: Greg Kurz @ 2016-12-14  8:20 UTC (permalink / raw)
  To: Eric Van Hensbergen; +Cc: v9fs-developer, trivial, linux-kernel

Both defines should at least have enclosing parenthesis to be usable in
any syntactical situation. This is the case of U16_MAX and U32_MAX, so
let's use them.

This patch is just cleanup, it doesn't change any behaviour with the current
code.

Signed-off-by: Greg Kurz <groug@kaod.org>
---
 include/net/9p/9p.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h
index 27dfe85772b1..5c80d98126b3 100644
--- a/include/net/9p/9p.h
+++ b/include/net/9p/9p.h
@@ -332,8 +332,8 @@ enum p9_qid_t {
 };
 
 /* 9P Magic Numbers */
-#define P9_NOTAG	(u16)(~0)
-#define P9_NOFID	(u32)(~0)
+#define P9_NOTAG	U16_MAX
+#define P9_NOFID	U32_MAX
 #define P9_MAXWELEM	16
 
 /* ample room for Twrite/Rread header */

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-12-14  8:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-14  8:20 [PATCH] 9p: safer definition of P9_NOTAG and P9_NOFID Greg Kurz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).