diff options
author | Haakon Nessjoen <haakon.nessjoen@gmail.com> | 2010-10-18 17:33:21 +0200 |
---|---|---|
committer | Haakon Nessjoen <haakon.nessjoen@gmail.com> | 2010-10-18 17:33:21 +0200 |
commit | 2d54c2e3702c88ef464da34663071c1cc54012bb (patch) | |
tree | ee6b375d14ee62dcac6e8b1bae33c7ca2e940c70 | |
parent | accffc10a27d2dbe5c9c35ab4179221b612dbcff (diff) | |
download | MAC-Telnet-2d54c2e3702c88ef464da34663071c1cc54012bb.tar.gz MAC-Telnet-2d54c2e3702c88ef464da34663071c1cc54012bb.zip |
Only linux returnes you a mallocd buffer, only free on linux
-rw-r--r-- | devices.c | 4 | ||||
-rw-r--r-- | mactelnet.c | 4 |
2 files changed, 3 insertions, 5 deletions
@@ -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 } |