Author: melifaro
Date: Wed Feb 20 14:19:09 2013
New Revision: 247037
URL: http://svnweb.freebsd.org/changeset/base/247037

Log:
  Fix several new & old style issues.
  
  Pointed by:   ae, pluknet, zont
  MFC with:     r247036

Modified:
  head/usr.bin/systat/ifcmds.c
  head/usr.bin/systat/ifstat.c
  head/usr.bin/systat/systat.1

Modified: head/usr.bin/systat/ifcmds.c
==============================================================================
--- head/usr.bin/systat/ifcmds.c        Wed Feb 20 13:47:05 2013        
(r247036)
+++ head/usr.bin/systat/ifcmds.c        Wed Feb 20 14:19:09 2013        
(r247037)
@@ -59,16 +59,14 @@ ifcmd(const char *cmd, const char *args)
        } else if (prefix(cmd, "match")) {
                if (args != NULL && *args != '\0' && memcmp(args, "*", 2) != 0) 
{
                        /* We got a valid match line */
-                       if (matchline != NULL) {
+                       if (matchline != NULL)
                                free(matchline);
-                       }
                        needsort = 1;
                        matchline = strdup(args);
                } else {
                        /* Empty or * pattern, turn filtering off */
-                       if (matchline != NULL) {
+                       if (matchline != NULL)
                                free(matchline);
-                       }
                        needsort = 1;
                        matchline = NULL;
                }

Modified: head/usr.bin/systat/ifstat.c
==============================================================================
--- head/usr.bin/systat/ifstat.c        Wed Feb 20 13:47:05 2013        
(r247036)
+++ head/usr.bin/systat/ifstat.c        Wed Feb 20 14:19:09 2013        
(r247037)
@@ -230,7 +230,7 @@ initifstat(void)
 
        n = getifnum();
        if (n <= 0)
-               return -1;
+               return (-1);
 
        SLIST_INIT(&curlist);
 
@@ -254,7 +254,7 @@ initifstat(void)
 
        sort_interface_list();
 
-       return 1;
+       return (1);
 }
 
 void
@@ -372,9 +372,9 @@ check_match(const char *ifname) 
        char *p = matchline, *c, t;
        int match = 0, mlen;
        
-       if (matchline == NULL) {
-               return 0;
-       }
+       if (matchline == NULL)
+               return (0);
+
        /* Strip leading whitespaces */
        while (*p == ' ')
                p ++;
@@ -387,7 +387,7 @@ check_match(const char *ifname) 
                        *p = '\0';
                        if (fnmatch(c, ifname, FNM_CASEFOLD) == 0) {
                                *p = t;
-                               return 1;
+                               return (1);
                        }
                        *p = t;
                        c = p + strspn(p, " ;,");
@@ -397,7 +397,7 @@ check_match(const char *ifname) 
                }
        }
 
-       return match;
+       return (match);
 }
 
 /*
@@ -447,7 +447,7 @@ getifnum(void)
        if (sysctl(name, 5, (void *)&data, (size_t *)&datalen, (void *)NULL,
            (size_t)0) != 0)
                IFSTAT_ERR(1, "sysctl error");
-       return data;
+       return (data);
 }
 
 static void
@@ -485,5 +485,5 @@ cmdifstat(const char *cmd, const char *a
                }
        }
 
-       return retval;
+       return (retval);
 }

Modified: head/usr.bin/systat/systat.1
==============================================================================
--- head/usr.bin/systat/systat.1        Wed Feb 20 13:47:05 2013        
(r247036)
+++ head/usr.bin/systat/systat.1        Wed Feb 20 14:19:09 2013        
(r247037)
@@ -28,7 +28,7 @@
 .\"    @(#)systat.1    8.2 (Berkeley) 12/30/93
 .\" $FreeBSD$
 .\"
-.Dd September 17, 2012
+.Dd February 20, 2013
 .Dt SYSTAT 1
 .Os
 .Sh NAME
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to