Kernel - Cleaning up a little (implemented MIN and MAX functions)
[tpg/acess2.git] / Kernel / lib.c
index 369b7b0..c1e2807 100644 (file)
@@ -490,11 +490,11 @@ char *strcpy(char *__str1, const char *__str2)
  * \brief Copy a string to a new location
  * \note Copies at most `max` chars
  */
-char *strncpy(char *__str1, const char *__str2, size_t max)
+char *strncpy(char *__str1, const char *__str2, size_t __max)
 {
-       while(*__str2 && max-- >= 1)
+       while(*__str2 && __max-- >= 1)
                *__str1++ = *__str2++;
-       if(max)
+       if(__max)
                *__str1 = '\0'; // Terminate String
        return __str1;
 }

UCC git Repository :: git.ucc.asn.au