mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
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
d2e32c6770
commit
bc234bdcac
1 changed files with 4 additions and 2 deletions
|
|
@ -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 a new issue