tree-wide: avoid uninitialized warning on _cleanup_ variables

With some versions of the compiler, the _cleanup_ attr makes it think
the variable might be freed/closed when uninitialized, even though it
cannot happen. The added cost is small enough to be worth the benefit,
and optimized builds will help reduce it even further.
This commit is contained in:
Luca Boccassi
2021-04-14 12:25:06 +01:00
parent be084c0dd1
commit c2b2df604b
61 changed files with 106 additions and 106 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ static int netdev_fill_tuntap_message(NetDev *netdev, struct ifreq *ifr) {
}
static int netdev_tuntap_add(NetDev *netdev, struct ifreq *ifr) {
_cleanup_close_ int fd;
_cleanup_close_ int fd = -1;
TunTap *t = NULL;
const char *user;
const char *group;