projects
/
platform
/
upstream
/
multipath-tools.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Imported Upstream version 0.6.3
[platform/upstream/multipath-tools.git]
/
kpartx
/
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
}