3 char *strncpy(char *s1, const char *s2, size_t n) {
5 while ( (n > 0) && (*s1++ = *s2++) ) {
6 /* Cannot do "n--" in the conditional as size_t is unsigned and we have
7 * to check it again for >0 in the next loop below, so we must not risk
12 /* Checking against 1 as we missed the last --n in the loop above. */