Avoid (unnecessarily) casting away const within uuid_is_nil.
This commit is contained in:
parent
0c0e9713a6
commit
f57a875fa0
@ -37,7 +37,7 @@
|
|||||||
int32_t
|
int32_t
|
||||||
uuid_is_nil(const uuid_t *u, uint32_t *status)
|
uuid_is_nil(const uuid_t *u, uint32_t *status)
|
||||||
{
|
{
|
||||||
uint32_t *p;
|
const uint32_t *p;
|
||||||
|
|
||||||
if (status)
|
if (status)
|
||||||
*status = uuid_s_ok;
|
*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
|
* Pick the largest type that has equivalent alignment constraints
|
||||||
* as an UUID and use it to test if the UUID consists of all zeroes.
|
* 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);
|
return ((p[0] == 0 && p[1] == 0 && p[2] == 0 && p[3] == 0) ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user