summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaakon Nessjoen <haakon.nessjoen@gmail.com>2010-10-18 17:33:21 +0200
committerHaakon Nessjoen <haakon.nessjoen@gmail.com>2010-10-18 17:33:21 +0200
commit2d54c2e3702c88ef464da34663071c1cc54012bb (patch)
treeee6b375d14ee62dcac6e8b1bae33c7ca2e940c70
parentaccffc10a27d2dbe5c9c35ab4179221b612dbcff (diff)
downloadMAC-Telnet-2d54c2e3702c88ef464da34663071c1cc54012bb.tar.gz
MAC-Telnet-2d54c2e3702c88ef464da34663071c1cc54012bb.zip
Only linux returnes you a mallocd buffer, only free on linux
-rw-r--r--devices.c4
-rw-r--r--mactelnet.c4
2 files changed, 3 insertions, 5 deletions
diff --git a/devices.c b/devices.c
index 899411c..23ad688 100644
--- a/devices.c
+++ b/devices.c
@@ -30,8 +30,8 @@
-#if ! defined(IFT_ETHER)
-#define IFT_ETHER 0x6/* Ethernet CSMACD */
+#ifndef IFT_ETHER
+#define IFT_ETHER 0x6 /* Ethernet CSMACD */
#endif
int getDeviceMAC(const int sockfd, const unsigned char *deviceName, unsigned char *mac) {
diff --git a/mactelnet.c b/mactelnet.c
index 637b9f8..2b05431 100644
--- a/mactelnet.c
+++ b/mactelnet.c
@@ -393,11 +393,9 @@ int main (int argc, char **argv) {
password[sizeof(password) - 1] = '\0';
/* security */
memset(tmp, 0, strlen(tmp));
-#ifdef __GNUC__
-#ifndef __APPLE_CC__
+#ifdef __gnu_linux__
free(tmp);
#endif
-#endif
}