From a1b4f96f60455f8daf1f6550b22b32324c899f0d Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Wed, 3 Feb 2010 14:18:44 +0000 Subject: update linux tweak --- watch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3