[go: nahoru, domu]

Skip to content

Commit

Permalink
Remove unused functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Tiiffi committed Dec 20, 2019
1 parent c62d5c8 commit cffa73d
Showing 1 changed file with 1 addition and 29 deletions.
30 changes: 1 addition & 29 deletions mcrcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,11 @@ typedef struct _rc_packet {
// ignoring string2 for now
} rc_packet;


// ===================================
// FUNCTION DEFINITIONS
// ===================================

// endianness related functions
bool is_bigendian(void);
int32_t reverse_int32(int32_t n);

// Network related functions
#ifdef _WIN32
void net_init_WSA(void);
Expand Down Expand Up @@ -696,28 +693,3 @@ int get_line(char *buffer, int bsize)

return len;
}

// http://www.ibm.com/developerworks/aix/library/au-endianc/
bool is_bigendian(void)
{
const int32_t n = 1;

if (*(const uint8_t *) &n == 0 )
return true;

return false;
}

int32_t reverse_int32(int32_t n)
{
int32_t tmp;
uint8_t *t = (uint8_t *) &tmp;
uint8_t *p = (uint8_t *) &n;

t[0] = p[3];
t[1] = p[2];
t[2] = p[1];
t[3] = p[0];

return tmp;
}

0 comments on commit cffa73d

Please sign in to comment.