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