chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
allow multiple values to be matched with KEY=="value1|value2"
[elogind.git]
/
klibc
/
klibc
/
strncat.c
1
/*
2
* strncat.c
3
*/
4
5
#include <string.h>
6
#include <klibc/compiler.h>
7
8
char *strncat(char *dst, const char *src, size_t n)
9
{
10
char *q = strchr(dst, '\0');
11
const char *p = src;
12
char ch;
13
14
while (n--) {
15
*q++ = ch = *p++;
16
if ( !ch )
17
return dst;
18
}
19
*q = '\0';
20
21
return dst;
22
}