mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
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 <mkletzan@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
a16bd55819
commit
4ce9196dc4
@ -232,7 +232,7 @@ int virNetDevTapCreate(char **ifname,
|
|||||||
if (ioctl(fd, TUNSETIFF, &ifr) < 0) {
|
if (ioctl(fd, TUNSETIFF, &ifr) < 0) {
|
||||||
virReportSystemError(errno,
|
virReportSystemError(errno,
|
||||||
_("Unable to create tap device %1$s"),
|
_("Unable to create tap device %1$s"),
|
||||||
NULLSTR(*ifname));
|
*ifname);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -247,7 +247,7 @@ int virNetDevTapCreate(char **ifname,
|
|||||||
ioctl(fd, TUNSETPERSIST, 1) < 0) {
|
ioctl(fd, TUNSETPERSIST, 1) < 0) {
|
||||||
virReportSystemError(errno,
|
virReportSystemError(errno,
|
||||||
_("Unable to set tap device %1$s to persistent"),
|
_("Unable to set tap device %1$s to persistent"),
|
||||||
NULLSTR(*ifname));
|
*ifname);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
tapfd[i] = fd;
|
tapfd[i] = fd;
|
||||||
|
Loading…
Reference in New Issue
Block a user