This will not only help us in the future when adding more and more
VIR_AUTOPTR instances, we're also consistent in that a compound type
gets its own function which can easily be extended in the future if
necessary.
Signed-off-by: Sukrit Bhatnagar <skrtbhtngr@gmail.com>
Signed-off-by: Erik Skultety <eskultet@redhat.com>
{
return memcmp(virMacAddrBroadcastAddrRaw, s, sizeof(*s)) == 0;
}
+
+void
+virMacAddrFree(virMacAddrPtr addr)
+{
+ VIR_FREE(addr);
+}
# define __VIR_MACADDR_H__
# include "internal.h"
+# include "viralloc.h"
# define VIR_MAC_BUFLEN 6
# define VIR_MAC_HEXLEN (VIR_MAC_BUFLEN * 2)
bool virMacAddrIsUnicast(const virMacAddr *addr);
bool virMacAddrIsMulticast(const virMacAddr *addr);
bool virMacAddrIsBroadcastRaw(const unsigned char s[VIR_MAC_BUFLEN]);
+void virMacAddrFree(virMacAddrPtr addr);
+
#endif /* __VIR_MACADDR_H__ */