Author: pfg
Date: Tue Aug 23 15:49:31 2016
New Revision: 304686
URL: https://svnweb.freebsd.org/changeset/base/304686

Log:
  indent(1): have the memset invocation somewhat more canonical.
  
  While correct, the previous invocation was somewhat more error prone.
  
  Pointed out by:       delphij, bde

Modified:
  head/usr.bin/indent/io.c

Modified: head/usr.bin/indent/io.c
==============================================================================
--- head/usr.bin/indent/io.c    Tue Aug 23 15:48:27 2016        (r304685)
+++ head/usr.bin/indent/io.c    Tue Aug 23 15:49:31 2016        (r304686)
@@ -630,7 +630,7 @@ parsefont(struct fstate *f, const char *
     const char *s = s0;
     int         sizedelta = 0;
 
-    memset(f, 0, sizeof(struct fstate));
+    memset(f, '\0', sizeof(*f));
     while (*s) {
        if (isdigit(*s))
            f->size = f->size * 10 + *s - '0';
_______________________________________________
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