X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Futils.c;h=9ec2252471299ba0d1798fa2495b60d7ef94cfc7;hb=e25370c54e78fda0a7996b008f7ad68aa80f2ccd;hp=71fe3dead951a04eeaff6d9eb282f4cd22ce1c42;hpb=196806f90f40fcc0cf727abd4bed6bc5aefff5ff;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; }