X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Futils.c;h=656f1ea41ac38b46f243a6c67f3658327408b359;hp=c629ae0b50cd94a5b0169ca868e6f2c55357a525;hb=985d19caf20058db3c764f0f6fbeafa8bcc59fcc;hpb=c9084dfa2654349efcaffd51f120399f903f756a diff --git a/src/utils.c b/src/utils.c index c629ae0b..656f1ea4 100644 --- a/src/utils.c +++ b/src/utils.c @@ -1,7 +1,7 @@ /* utils.c -- gathering of some stupid small functions Copyright (C) 1999-2005 Ivo Timmermans - 2000-2009 Guus Sliepen + 2000-2014 Guus Sliepen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -73,8 +73,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; }