Message ID | 1448529080-710-1-git-send-email-rahul.jain@samsung.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Johannes Berg |
Headers | show |
Err, the other patch I can kinda understand - but this one? What kind of static checker is giving that warning, and what does it really mean? please describe in the commit log... actually I'm not sure why I should apply this at all even, if there's a problem just make the function prototype "unsigned char"? johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/util.c b/util.c index 8fd14bd..7edc830 100644 --- a/util.c +++ b/util.c @@ -330,11 +330,13 @@ void print_ssid_escaped(const uint8_t len, const uint8_t *data) static int hex2num(char digit) { + unsigned char temp; + temp = digit; if (!isxdigit(digit)) return -1; if (isdigit(digit)) return digit - '0'; - return tolower(digit) - 'a' + 10; + return tolower(temp) - 'a' + 10; } static int hex2byte(char *hex)