Avoid (unnecessarily) casting away const within uuid_is_nil.

This commit is contained in:
Xin LI 2005-05-11 13:18:10 +00:00
parent 0c0e9713a6
commit f57a875fa0

View File

@ -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);
}