[PATCH rdma-core 2/5] util: Fix check_snprintf to use __rc__ for local

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



To avoid clashing with user variables.

Signed-off-by: Jason Gunthorpe <jgunthorpe@xxxxxxxxxxxxxxxxxxxx>
---
 util/util.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/util/util.h b/util/util.h
index cbf0deca2dde7b..30d32ee6b51e24 100644
--- a/util/util.h
+++ b/util/util.h
@@ -8,8 +8,8 @@
  * error */
 #define check_snprintf(buf, len, fmt, ...)                                     \
 	({                                                                     \
-		int rc = snprintf(buf, len, fmt, ##__VA_ARGS__);               \
-		(rc < len && rc >= 0);                                         \
+		int __rc__ = snprintf(buf, len, fmt, ##__VA_ARGS__);           \
+		(__rc__ < len && __rc__ >= 0);                                 \
 	})
 
 /* a CMP b. See also the BSD macro timercmp(). */
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux