Skip to content

Commit

Permalink
uuid: Take const on input of uuid_is_null() and guid_is_null()
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Christoph Hellwig <hch@lst.de>
  • Loading branch information
Andy Shevchenko authored and Christoph Hellwig committed Jun 20, 2017
1 parent 87085ff commit 63709fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/linux/uuid.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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);
}
Expand Down

0 comments on commit 63709fd

Please sign in to comment.