}
static int network_link_get_string(int ifindex, const char *field, char **ret) {
- char path[STRLEN("/run/systemd/netif/links/") + DECIMAL_STR_MAX(ifindex) + 1];
+ char path[STRLEN("/run/systemd/netif/links/") + DECIMAL_STR_MAX(ifindex)];
_cleanup_free_ char *s = NULL;
int r;
}
static int network_link_get_strv(int ifindex, const char *key, char ***ret) {
- char path[STRLEN("/run/systemd/netif/links/") + DECIMAL_STR_MAX(ifindex) + 1];
+ char path[STRLEN("/run/systemd/netif/links/") + DECIMAL_STR_MAX(ifindex)];
_cleanup_strv_free_ char **a = NULL;
_cleanup_free_ char *s = NULL;
int r;
}
int sd_network_link_get_dns_default_route(int ifindex) {
- char path[STRLEN("/run/systemd/netif/links/") + DECIMAL_STR_MAX(ifindex) + 1];
+ char path[STRLEN("/run/systemd/netif/links/") + DECIMAL_STR_MAX(ifindex)];
_cleanup_free_ char *s = NULL;
int r;
}
static int network_link_get_ifindexes(int ifindex, const char *key, int **ret) {
- char path[STRLEN("/run/systemd/netif/links/") + DECIMAL_STR_MAX(ifindex) + 1];
+ char path[STRLEN("/run/systemd/netif/links/") + DECIMAL_STR_MAX(ifindex)];
_cleanup_free_ int *ifis = NULL;
_cleanup_free_ char *s = NULL;
size_t c = 0;