From 18ae87b39624fac492f68cc0b5f964955f9d5fa1 Mon Sep 17 00:00:00 2001 From: Diadlo Date: Sun, 11 Jun 2017 18:21:40 +0300 Subject: [PATCH] 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 --- sasl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sasl.c b/sasl.c index d5239dc..dad73da 100644 --- a/sasl.c +++ b/sasl.c @@ -308,7 +308,7 @@ void sasl_digest_md5(char *result, char *login, char *pass, char *buffer, char * currentpos = 0; } pbuffer++; - } while ((pbuffer[0] != '\0') && (pbuffer[0] > 31) && (ind < array_size)); + } while ((pbuffer[0] > 31) && (ind < array_size)); //save the latest one if (ind < array_size) { array[ind] = malloc(currentpos + 1);