diff --git a/src/libvirt.c b/src/libvirt.c
index 05d20e9..e5043d1 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -22095,11 +22095,10 @@ virNetworkGetDHCPLeasesForMAC(virNetworkPtr network,
     }
 
     /* Validate the MAC address */
-    if (mac && virMacAddrParse(mac, &addr) < 0) {
-        virReportInvalidArg(mac,
+    if (virMacAddrParse(mac, &addr) < 0) {
+        virReportInvalidArg(mac, "%s",
                             _("Given MAC Address doesn't comply "
-                              "with the standard (IEEE 802) format in %s"),
-                            __FUNCTION__);
+                              "with the standard (IEEE 802) format"));
         goto error;
     }
 
