aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2010-02-03 14:18:44 +0000
committerDimitri Sokolyuk <demon@dim13.org>2010-02-03 14:18:44 +0000
commita1b4f96f60455f8daf1f6550b22b32324c899f0d (patch)
treef7a67a6188eab81c33c3d73f2b6d7c4728773e1f
parentf487e2117f5799ac84faa5a5bd907004b23ccab6 (diff)
update linux tweak
-rw-r--r--watch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/watch.c b/watch.c
index 7b2da43..43ada5d 100644
--- a/watch.c
+++ b/watch.c
@@ -41,7 +41,7 @@ const int major = 1;
#ifndef __dead
#define __dead __attribute__((noreturn))
#endif
-#define strlcpy(d,s,l) (strncpy(d,s,l), (d)[(l) - 1] = '\0')
+#define strlcpy(d,s,l) (strncpy(d,s,(l) - strlen(d) - 1), (d)[(l) - 1] = '\0')
#define strlcat(d,s,l) strncat(d,s,(l) - strlen(d) - 1)
#endif