summaryrefslogtreecommitdiffstats
path: root/apps/plugins/lua/strncat.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lua/strncat.c')
-rw-r--r--apps/plugins/lua/strncat.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/apps/plugins/lua/strncat.c b/apps/plugins/lua/strncat.c
index 5b15ff07b1..147397440a 100644
--- a/apps/plugins/lua/strncat.c
+++ b/apps/plugins/lua/strncat.c
@@ -8,11 +8,27 @@ char *strncat(char *s, const char *t, size_t n) {
s+=strlen(s);
if (__unlikely((max=s+n)==s)) goto fini;
for (;;) {
- if (__unlikely(!(*s = *t))) break; if (__unlikely(++s==max)) break; ++t;
+ if (__unlikely(!(*s = *t)))
+ break;
+ if (__unlikely(++s==max))
+ break;
+ ++t;
#ifndef WANT_SMALL_STRING_ROUTINES
- if (__unlikely(!(*s = *t))) break; if (__unlikely(++s==max)) break; ++t;
- if (__unlikely(!(*s = *t))) break; if (__unlikely(++s==max)) break; ++t;
- if (__unlikely(!(*s = *t))) break; if (__unlikely(++s==max)) break; ++t;
+ if (__unlikely(!(*s = *t)))
+ break;
+ if (__unlikely(++s==max))
+ break;
+ ++t;
+ if (__unlikely(!(*s = *t)))
+ break;
+ if (__unlikely(++s==max))
+ break;
+ ++t;
+ if (__unlikely(!(*s = *t)))
+ break;
+ if (__unlikely(++s==max))
+ break;
+ ++t;
#endif
}
*s=0;