From: Martin Kletzander Date: Wed, 4 Sep 2024 08:16:50 +0000 (+0200) Subject: virnetdevtap: Do (not) use NULLSTR consistently X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=4ce9196dc4676ab8778ebffc6b523887241e8906;p=libvirt.git virnetdevtap: Do (not) use NULLSTR consistently 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 Reviewed-by: Michal Privoznik --- diff --git a/src/util/virnetdevtap.c b/src/util/virnetdevtap.c index 9a4866a4e4..55536b5f4b 100644 --- a/src/util/virnetdevtap.c +++ b/src/util/virnetdevtap.c @@ -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;