Bah, as my luck would have it, I had a kernel source tree in the window
while strlcpy() existed, before it got backed out due to an extended bikeshed argument. Sigh. Back to the old version with the redundant code to terminate the string. :-(
This commit is contained in:
parent
7e605d2e0f
commit
cf3baa5309
@ -273,7 +273,8 @@ static void __Tunable_ ## var (void *ignored) \
|
||||
tmp = getenv((path)); \
|
||||
if (tmp == NULL) \
|
||||
tmp = (defval); \
|
||||
strlcpy((var), tmp, (size)); \
|
||||
strncpy((var), tmp, (size)); \
|
||||
(var)[(size) - 1] = 0; \
|
||||
} \
|
||||
SYSINIT(__Tunable_init_ ## var, SI_SUB_TUNABLES, SI_ORDER_MIDDLE, __Tunable_ ## var , NULL);
|
||||
|
||||
@ -284,7 +285,8 @@ static void __Tunable_ ## var (void *ignored) \
|
||||
tmp = getenv((path)); \
|
||||
if (tmp == NULL) \
|
||||
tmp = (defval); \
|
||||
strlcpy((var), tmp, (size)); \
|
||||
strncpy((var), tmp, (size)); \
|
||||
(var)[(size) - 1] = 0; \
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user