Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1667977 > unrolled thread

[PATCH v1] uuid: Take const on input of uuid_is_null() and guid_is_null()

Started byAndy Shevchenko <andriy.shevchenko@linux.intel.com>
First post2017-06-16 20:20 +0200
Last post2017-06-16 20:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH v1] uuid: Take const on input of uuid_is_null() and guid_is_null() Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-06-16 20:20 +0200

#1667977 — [PATCH v1] uuid: Take const on input of uuid_is_null() and guid_is_null()

FromAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Date2017-06-16 20:20 +0200
Subject[PATCH v1] uuid: Take const on input of uuid_is_null() and guid_is_null()
Message-ID<tT40H-3II-49@gated-at.bofh.it>
The null check functions do not and must not modify contents of the UUID
or GUID supplied.

Mark argument explicitly to reflect that.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 include/linux/uuid.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/uuid.h b/include/linux/uuid.h
index 75f7182d5360..d1defe4ab167 100644
--- a/include/linux/uuid.h
+++ b/include/linux/uuid.h
@@ -48,7 +48,7 @@ static inline void guid_copy(guid_t *dst, const guid_t *src)
 	memcpy(dst, src, sizeof(guid_t));
 }
 
-static inline bool guid_is_null(guid_t *guid)
+static inline bool guid_is_null(const guid_t *guid)
 {
 	return guid_equal(guid, &guid_null);
 }
@@ -63,7 +63,7 @@ static inline void uuid_copy(uuid_t *dst, const uuid_t *src)
 	memcpy(dst, src, sizeof(uuid_t));
 }
 
-static inline bool uuid_is_null(uuid_t *uuid)
+static inline bool uuid_is_null(const uuid_t *uuid)
 {
 	return uuid_equal(uuid, &uuid_null);
 }
-- 
2.11.0

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web