Files
systemd/src/libsystemd-network/network-common.c

16 lines
338 B
C

/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include "format-util.h"
#include "network-common.h"
int get_ifname(int ifindex, char **ifname) {
assert(ifname);
/* This sets ifname only when it is not set yet. */
if (*ifname)
return 0;
return format_ifname_alloc(ifindex, ifname);
}