From 556f00e4af55e78836c45f47b0662ab44bbb8b48 Mon Sep 17 00:00:00 2001 From: deva Date: Tue, 20 May 2008 14:03:10 +0000 Subject: Made fixes pointed out by GCC 4.2 and -D_FORTIFY_SOURCES=2 --- server/src/queryhandler.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'server/src/queryhandler.cc') diff --git a/server/src/queryhandler.cc b/server/src/queryhandler.cc index b78f8c4..b9ff7a1 100644 --- a/server/src/queryhandler.cc +++ b/server/src/queryhandler.cc @@ -62,7 +62,7 @@ typedef struct { #define SIOCGIFCONF 0x8912 // get iface list -static in_addr_t getIP(char *interface) +static in_addr_t getIP(const char *interface) { in_addr_t ret = 0; int numreqs = 30, sd, n; @@ -112,7 +112,7 @@ static unsigned short getCounter() } static UID uid = {0,0,0,0}; -static std::string getUID(char *interface) +static std::string getUID(const char *interface) { if(!uid.ip) uid.ip = getIP(interface); @@ -188,7 +188,8 @@ std::string QueryHandler::exec() socket->write(buf, strlen(buf)); // Terminate - socket->write("\0", 1); + char term[] = "\0"; + socket->write(term, 1); // Wait for answer char abuf[64]; -- cgit v1.2.3