summaryrefslogtreecommitdiffstats
path: root/main/glib/strncat.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/glib/strncat.c')
-rw-r--r--main/glib/strncat.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/main/glib/strncat.c b/main/glib/strncat.c
index 9630ba3..c6d6eb4 100644
--- a/main/glib/strncat.c
+++ b/main/glib/strncat.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
+ * The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Chris Torek.
@@ -44,20 +44,22 @@ __FBSDID("$FreeBSD$");
* are written at dst (at most n+1 bytes being appended). Return dst.
*/
char *
-strncat(char * __restrict dst, const char * __restrict src, size_t n)
+strncat(char *__restrict dst, const char *__restrict src, size_t n)
{
- if (n != 0) {
- char *d = dst;
- const char *s = src;
+ if(n != 0) {
+ char *d = dst;
+ const char *s = src;
- while (*d != 0)
- d++;
- do {
- if ((*d = *s++) == 0)
- break;
- d++;
- } while (--n != 0);
- *d = 0;
- }
- return (dst);
+ while(*d != 0) {
+ d++;
+ }
+ do {
+ if((*d = *s++) == 0) {
+ break;
+ }
+ d++;
+ } while(--n != 0);
+ *d = 0;
+ }
+ return (dst);
}