Allow sFlowCpInterval=0 to disable counter samples, and fix bug in sampler removal.
[openvswitch] / lib / dpif-linux.c
index b7ba3062e86da1f1902c9595d2f2269b645f96b3..3920d462f7e5bd374b664bd85d7221e92f2ecfd8 100644 (file)
@@ -107,7 +107,7 @@ dpif_linux_enumerate(struct svec *all_dps)
 }
 
 static int
-dpif_linux_open(const char *name UNUSED, char *suffix, bool create,
+dpif_linux_open(const char *name OVS_UNUSED, char *suffix, bool create,
                 struct dpif **dpifp)
 {
     int minor;
@@ -571,13 +571,14 @@ make_openvswitch_device(int minor, char **fnp)
     struct stat s;
     char fn[128];
 
+    *fnp = NULL;
+
     major = get_openvswitch_major();
     if (major < 0) {
         return -major;
     }
     dev = makedev(major, minor);
 
-    *fnp = NULL;
     sprintf(fn, "%s/dp%d", dirname, minor);
     if (!stat(fn, &s)) {
         if (!S_ISCHR(s.st_mode)) {