X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Futils.c;fp=src%2Futils.c;h=9ec2252471299ba0d1798fa2495b60d7ef94cfc7;hb=76c7550c8ab0e9c0ee14a9c396baa008cfb9bc42;hp=71fe3dead951a04eeaff6d9eb282f4cd22ce1c42;hpb=3c56342ef05b0f81bcd9feba5d86e2bff8a0cb94;p=meshlink diff --git a/src/utils.c b/src/utils.c index 71fe3dea..9ec22524 100644 --- a/src/utils.c +++ b/src/utils.c @@ -181,8 +181,8 @@ const char *winerror(int err) { unsigned int bitfield_to_int(const void *bitfield, size_t size) { unsigned int value = 0; - if(size > sizeof value) - size = sizeof value; + if(size > sizeof(value)) + size = sizeof(value); memcpy(&value, bitfield, size); return value; }