/* 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); }