git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Kernel - Cleaning up a little (implemented MIN and MAX functions)
[tpg/acess2.git]
/
Kernel
/
lib.c
diff --git
a/Kernel/lib.c
b/Kernel/lib.c
index
369b7b0
..
c1e2807
100644
(file)
--- a/
Kernel/lib.c
+++ b/
Kernel/lib.c
@@
-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
*/
* \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++;
*__str1++ = *__str2++;
- if(max)
+ if(
__
max)
*__str1 = '\0'; // Terminate String
return __str1;
}
*__str1 = '\0'; // Terminate String
return __str1;
}
UCC
git Repository :: git.ucc.asn.au