blob: b8b4ecdaae4e1d27ec326f87e6934de755f02073 [file] [log] [blame]
/* 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);
}