Fix gcc80 -Wsizeof-pointer-memaccess warning.
Obtained from: DragonFlyBSD (git 56267d362d5769c8df07bf26d5e322610e0d24b4)
This commit is contained in:
parent
1a4529b5e5
commit
e28c47b570
@ -135,8 +135,7 @@ int opieinsecure FUNCTION_NOARGS
|
||||
char host[sizeof(utmp.ut_host) + 1];
|
||||
insecure = 1;
|
||||
|
||||
strncpy(host, utmp.ut_host, sizeof(utmp.ut_host));
|
||||
host[sizeof(utmp.ut_host)] = 0;
|
||||
strncpy(host, utmp.ut_host, sizeof(host));
|
||||
|
||||
if (s = strchr(host, ':')) {
|
||||
int n = s - host;
|
||||
|
Loading…
Reference in New Issue
Block a user