2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

Switch from sscanf() to ovs_scan() throughout the tree.

Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Ben Pfaff
2013-11-09 15:44:23 -08:00
parent ed2232fc77
commit c2c28dfd68
13 changed files with 300 additions and 390 deletions

View File

@@ -147,8 +147,7 @@ str_to_be64(const char *str, ovs_be64 *valuep)
static char * WARN_UNUSED_RESULT
str_to_mac(const char *str, uint8_t mac[6])
{
if (sscanf(str, ETH_ADDR_SCAN_FMT, ETH_ADDR_SCAN_ARGS(mac))
!= ETH_ADDR_SCAN_COUNT) {
if (!ovs_scan(str, ETH_ADDR_SCAN_FMT, ETH_ADDR_SCAN_ARGS(mac))) {
return xasprintf("invalid mac address %s", str);
}
return NULL;