Skip to content

Commit

Permalink
Update strtoarr.c
Browse files Browse the repository at this point in the history
  • Loading branch information
ThePrimeJnr authored Jul 26, 2023
1 parent 21162c7 commit eb8650f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions strtoarr.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ int _strncmp(const char *str1, const char *str2, size_t n)
for (i = 0; i < n; i++)
{
if (str1[i] == '\0' || str2[i] == '\0')
return str1[i] - str2[i];
return (str1[i] - str2[i]);

if (str1[i] != str2[i])
return str1[i] - str2[i];
return (str1[i] - str2[i]);
}
return 0;
return (0);
}

0 comments on commit eb8650f

Please sign in to comment.