Print this page
10139 smatch fixes for usr/src/cmd/stat

@@ -9,10 +9,14 @@
  */
 
 /* from UCB 5.4 5/17/86 */
 /* from SunOS 4.1, SID 1.31 */
 
+/*
+ * Copyright (c) 2018, Joyent, Inc.
+ */
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdarg.h>
 #include <ctype.h>
 #include <unistd.h>

@@ -223,13 +227,10 @@
         struct iodev_snapshot *new = (struct iodev_snapshot *)v2;
         hrtime_t oldtime = new->is_crtime;
         double hr_etime;
         double reads, writes;
 
-        if (new == NULL)
-                return;
-
         if (old)
                 oldtime = old->is_stats.wlastupdate;
         hr_etime = new->is_stats.wlastupdate - oldtime;
         if (hr_etime == 0.0)
                 hr_etime = NANOSEC;