From 6ca3bb7174adc0f3e5fba3722af136f3d74326a5 Mon Sep 17 00:00:00 2001 From: fereidani Date: Wed, 24 Jun 2026 10:11:21 +0330 Subject: [PATCH] safestringlib: removing unnecessary null checks --- safeclib/snprintf_support.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/safeclib/snprintf_support.c b/safeclib/snprintf_support.c index d7a4b67..f7d2002 100644 --- a/safeclib/snprintf_support.c +++ b/safeclib/snprintf_support.c @@ -55,13 +55,13 @@ parse_format(const char *format, char pformatList[], unsigned int maxFormats) break; } // check for and skip the optional field width - while ( format[index] != '\0' && format[index] >= '0' && format[index] <= '9') { + while ( format[index] >= '0' && format[index] <= '9') { index++; } // Check for an skip the optional precision - if ( format[index] != '\0' && format[index] == '.') { + if ( format[index] == '.') { index++; // skip the period - while ( format[index] != '\0' && format[index] >= '0' && format[index] <= '9') { + while ( format[index] >= '0' && format[index] <= '9') { index++; } }