]> xenbits.xensource.com Git - libvirt.git/commitdiff
virnetdevtap: Do (not) use NULLSTR consistently
authorMartin Kletzander <mkletzan@redhat.com>
Wed, 4 Sep 2024 08:16:50 +0000 (10:16 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Wed, 4 Sep 2024 10:21:19 +0000 (12:21 +0200)
The function generates *ifname from the get go and most functions do not
wrap the string in a NULLSTR as it is not necessary.  The few leftovers
are outliers that are changed to fit the theme better.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/util/virnetdevtap.c

index 9a4866a4e4dfac417f594a40f94c54533f0276c1..55536b5f4be20b7db448b9569a1f6512f6348556 100644 (file)
@@ -232,7 +232,7 @@ int virNetDevTapCreate(char **ifname,
         if (ioctl(fd, TUNSETIFF, &ifr) < 0) {
             virReportSystemError(errno,
                                  _("Unable to create tap device %1$s"),
-                                 NULLSTR(*ifname));
+                                 *ifname);
             goto cleanup;
         }
 
@@ -247,7 +247,7 @@ int virNetDevTapCreate(char **ifname,
             ioctl(fd, TUNSETPERSIST, 1) < 0) {
             virReportSystemError(errno,
                                  _("Unable to set tap device %1$s to persistent"),
-                                 NULLSTR(*ifname));
+                                 *ifname);
             goto cleanup;
         }
         tapfd[i] = fd;