projects
/
lcr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed reloading of interfaces with SIP support
[lcr.git]
/
macro.h
diff --git
a/macro.h
b/macro.h
index
5d2bce5
..
e4a2f2e
100644
(file)
--- a/
macro.h
+++ b/
macro.h
@@
-22,10
+22,10
@@
static inline void scpy(char *dst, const char *src, unsigned int siz)
/* safe strcat/strncat */
/* safe strcat/strncat */
-#define SCAT(dst, src) scat(dst, src, sizeof(dst)
-strlen(dst)-1
)
+#define SCAT(dst, src) scat(dst, src, sizeof(dst))
static inline void scat(char *dst, const char *src, unsigned int siz)
{
static inline void scat(char *dst, const char *src, unsigned int siz)
{
- strncat(dst, src, siz);
+ strncat(dst, src, siz
-strlen(dst)-1
);
dst[siz-1] = '\0';
}
dst[siz-1] = '\0';
}