explicit initialization of result in s2d_strlen

This commit is contained in:
farisawan-2000 committed 2021-01-15 17:26:07 -05:00
1 parent e6e134fff6
commit 299b6bc1f5
1 file changed
+1 -1
+1 -1
View File
@@ -48,7 +48,7 @@ int s2d_ilen(char *s) {
}
int s2d_strlen(char *s) {
int result;
int result = 0;
char *p = s;
do {result++;} while (*(++p) != '\0');
return result;