Skip to content

Commit

Permalink
Tabs to spaces conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
toofishes committed Feb 24, 2012
1 parent 59d26d3 commit b5a91cb
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions shairport.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,13 +376,13 @@ static void handleClient(int pSock, char *pPassword, char *pHWADDR)
port = ntohs(s->sin6_port);
inet_ntop(AF_INET6, &s->sin6_addr, ipstr, sizeof ipstr);

union {
struct sockaddr_in6 s;
unsigned char bin[sizeof(struct sockaddr_in6)];
} addr;
memcpy(&addr.s, &s->sin6_addr, sizeof(struct sockaddr_in6));
if(memcmp(&addr.bin[0], "\x00\x00\x00\x00" "\x00\x00\x00\x00" "\x00\x00\xff\xff", 12) == 0)
union {
struct sockaddr_in6 s;
unsigned char bin[sizeof(struct sockaddr_in6)];
} addr;
memcpy(&addr.s, &s->sin6_addr, sizeof(struct sockaddr_in6));

if(memcmp(&addr.bin[0], "\x00\x00\x00\x00" "\x00\x00\x00\x00" "\x00\x00\xff\xff", 12) == 0)
{
// its ipv4...
memcpy(ipbin, &addr.bin[12], 4);
Expand Down

0 comments on commit b5a91cb

Please sign in to comment.