little fixes
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40362
This commit is contained in:
parent
8dfb783b14
commit
ba1d7ae82f
@ -611,8 +611,6 @@ unsigned long _GeoIP_lookupaddress (const char *host) {
|
||||
struct hostent phe2;
|
||||
struct hostent * phe = &phe2;
|
||||
char *buf = NULL;
|
||||
int buflength = 16384;
|
||||
int herr = 0;
|
||||
int result = 0;
|
||||
#ifdef HAVE_GETHOSTBYNAME_R
|
||||
buf = malloc(buflength);
|
||||
@ -923,7 +921,7 @@ char *_get_name (GeoIP* gi, unsigned long ipnum) {
|
||||
org_buf = malloc(len);
|
||||
strncpy(org_buf, buf, len);
|
||||
} else {
|
||||
buf_pointer = gi->cache + (long)record_pointer;
|
||||
buf_pointer = (char *)(gi->cache + (long)record_pointer);
|
||||
len = sizeof(char) * (strlen(buf_pointer)+1);
|
||||
org_buf = malloc(len);
|
||||
strncpy(org_buf, buf_pointer, len);
|
||||
|
@ -45,10 +45,10 @@ CPPFLAGS = -Wno-non-virtual-dtor -fno-exceptions -fno-rtti
|
||||
|
||||
ifeq "$(DEBUG)" "true"
|
||||
BIN_DIR = Debug
|
||||
CFLAGS = $(C_DEBUG_FLAGS)
|
||||
CFLAGS += $(C_DEBUG_FLAGS)
|
||||
else
|
||||
BIN_DIR = Release
|
||||
CFLAGS = $(C_OPT_FLAGS)
|
||||
CFLAGS += $(C_OPT_FLAGS)
|
||||
endif
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user