Remove useless null check

'while' has 2 pbuffer[0] checks:
- pbuffer[0] not equal to 0
- pbuffer[0] more then 31 (first printable char)

if pbuffer[0] more than 31 it's always not equal to 0 => first check is
useless
This commit is contained in:
Diadlo 2017-06-11 18:21:40 +03:00
parent a01712370b
commit 18ae87b396
No known key found for this signature in database
GPG key ID: 5AF9F2E29107C727

2
sasl.c
View file

@ -308,7 +308,7 @@ void sasl_digest_md5(char *result, char *login, char *pass, char *buffer, char *
currentpos = 0; currentpos = 0;
} }
pbuffer++; pbuffer++;
} while ((pbuffer[0] != '\0') && (pbuffer[0] > 31) && (ind < array_size)); } while ((pbuffer[0] > 31) && (ind < array_size));
//save the latest one //save the latest one
if (ind < array_size) { if (ind < array_size) {
array[ind] = malloc(currentpos + 1); array[ind] = malloc(currentpos + 1);