Author: pfg
Date: Sat Jan 27 22:16:19 2018
New Revision: 328492
URL: https://svnweb.freebsd.org/changeset/base/328492

Log:
  Fix gcc80 -Wsizeof-pointer-memaccess warning.
  
  Obtained from:        DragonFlyBSD (git 
56267d362d5769c8df07bf26d5e322610e0d24b4)

Modified:
  head/contrib/opie/libopie/insecure.c

Modified: head/contrib/opie/libopie/insecure.c
==============================================================================
--- head/contrib/opie/libopie/insecure.c        Sat Jan 27 21:25:45 2018        
(r328491)
+++ head/contrib/opie/libopie/insecure.c        Sat Jan 27 22:16:19 2018        
(r328492)
@@ -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;
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to