diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-02-19 19:24:16 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-02-21 20:40:57 +0100 |
commit | 691d4da98a1288d75ea62e470280684d075e9725 (patch) | |
tree | 2b83a6eebfd0957e0050c3d121c77ee4e7524bdb | |
parent | 7e5a080a943f81dfe0d71b0cb53094fe8fe6bc5a (diff) |
networkctl: make use of xsprintf() where we can
-rw-r--r-- | src/network/networkctl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/network/networkctl.c b/src/network/networkctl.c index a415f988f6..59d5a38ff0 100644 --- a/src/network/networkctl.c +++ b/src/network/networkctl.c @@ -324,8 +324,8 @@ static int list_links(int argc, char *argv[], void *userdata) { sd_network_link_get_setup_state(links[i].ifindex, &setup_state); setup_state_to_color(setup_state, &on_color_setup, &off_color_setup); - sprintf(devid, "n%i", links[i].ifindex); - (void)sd_device_new_from_device_id(&d, devid); + xsprintf(devid, "n%i", links[i].ifindex); + (void) sd_device_new_from_device_id(&d, devid); link_get_type_string(links[i].iftype, d, &t); @@ -615,7 +615,7 @@ static int link_status_one( (void) sd_network_link_get_route_domains(info->ifindex, &route_domains); (void) sd_network_link_get_ntp(info->ifindex, &ntp); - sprintf(devid, "n%i", info->ifindex); + xsprintf(devid, "n%i", info->ifindex); (void) sd_device_new_from_device_id(&d, devid); |