diff options
-rw-r--r-- | lib/strcase.h | 4 | ||||
-rw-r--r-- | lib/tftp.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/strcase.h b/lib/strcase.h index bbd6cd85d..b628656b9 100644 --- a/lib/strcase.h +++ b/lib/strcase.h @@ -41,8 +41,8 @@ int Curl_strncasecompare(const char *first, const char *second, size_t max); char Curl_raw_toupper(char in); /* checkprefix() is a shorter version of the above, used when the first - argument is zero-byte terminated */ -#define checkprefix(a,b) curl_strnequal(a,b,strlen(a)) + argument is the string literal */ +#define checkprefix(a,b) curl_strnequal(b, STRCONST(a)) void Curl_strntoupper(char *dest, const char *src, size_t n); void Curl_strntolower(char *dest, const char *src, size_t n); diff --git a/lib/tftp.c b/lib/tftp.c index d2d802565..7f2c88b71 100644 --- a/lib/tftp.c +++ b/lib/tftp.c @@ -327,7 +327,7 @@ static CURLcode tftp_parse_option_ack(struct tftp_state_data *state, infof(data, "got option=(%s) value=(%s)", option, value); - if(checkprefix(option, TFTP_OPTION_BLKSIZE)) { + if(checkprefix(TFTP_OPTION_BLKSIZE, option)) { long blksize; blksize = strtol(value, NULL, 10); @@ -359,7 +359,7 @@ static CURLcode tftp_parse_option_ack(struct tftp_state_data *state, infof(data, "%s (%d) %s (%d)", "blksize parsed from OACK", state->blksize, "requested", state->requested_blksize); } - else if(checkprefix(option, TFTP_OPTION_TSIZE)) { + else if(checkprefix(TFTP_OPTION_TSIZE, option)) { long tsize = 0; tsize = strtol(value, NULL, 10); |