From f57a875fa04d4531b602d536e3c543ae6eb9564c Mon Sep 17 00:00:00 2001 From: Xin LI Date: Wed, 11 May 2005 13:18:10 +0000 Subject: [PATCH] Avoid (unnecessarily) casting away const within uuid_is_nil. --- lib/libc/uuid/uuid_is_nil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/uuid/uuid_is_nil.c b/lib/libc/uuid/uuid_is_nil.c index 1db8265f4933..ee1865349dee 100644 --- a/lib/libc/uuid/uuid_is_nil.c +++ b/lib/libc/uuid/uuid_is_nil.c @@ -37,7 +37,7 @@ int32_t uuid_is_nil(const uuid_t *u, uint32_t *status) { - uint32_t *p; + const uint32_t *p; if (status) *status = uuid_s_ok; @@ -49,6 +49,6 @@ uuid_is_nil(const uuid_t *u, uint32_t *status) * Pick the largest type that has equivalent alignment constraints * as an UUID and use it to test if the UUID consists of all zeroes. */ - p = (uint32_t*)u; + p = (const uint32_t*)u; return ((p[0] == 0 && p[1] == 0 && p[2] == 0 && p[3] == 0) ? 1 : 0); }