userspace: Define and use struct eth_addr.
[cascardo/ovs.git] / lib / ofp-parse.c
index 372d72f..80011a5 100644 (file)
@@ -144,9 +144,9 @@ str_to_be64(const char *str, ovs_be64 *valuep)
  * Returns NULL if successful, otherwise a malloc()'d string describing the
  * error.  The caller is responsible for freeing the returned string. */
 char * OVS_WARN_UNUSED_RESULT
-str_to_mac(const char *str, uint8_t mac[ETH_ADDR_LEN])
+str_to_mac(const char *str, struct eth_addr *mac)
 {
-    if (!ovs_scan(str, ETH_ADDR_SCAN_FMT, ETH_ADDR_SCAN_ARGS(mac))) {
+    if (!ovs_scan(str, ETH_ADDR_SCAN_FMT, ETH_ADDR_SCAN_ARGS(*mac))) {
         return xasprintf("invalid mac address %s", str);
     }
     return NULL;