Added CONFIG_CLEAR and CONFIG_RESET to config.maemo
[busybox4maemo] / debian / sfdisk / xstrncpy.c
1 /* NUL-terminated version of strncpy() */
2 #include <string.h>
3 #include "xstrncpy.h"
4
5 /* caller guarantees n > 0 */
6 void
7 xstrncpy(char *dest, const char *src, size_t n) {
8         strncpy(dest, src, n-1);
9         dest[n-1] = 0;
10 }