projects
/
framework
/
base
/
util-linux-ng.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Upload Tizen:Base source
[framework/base/util-linux-ng.git]
/
include
/
xstrncpy.h
1
/* NUL-terminated version of strncpy() */
2
#include <string.h>
3
4
/* caller guarantees n > 0 */
5
static inline void xstrncpy(char *dest, const char *src, size_t n) {
6
strncpy(dest, src, n-1);
7
dest[n-1] = 0;
8
}