summaryrefslogtreecommitdiff
path: root/server/src/queryhandler.cc
diff options
context:
space:
mode:
authordeva <deva>2008-05-20 14:03:10 +0000
committerdeva <deva>2008-05-20 14:03:10 +0000
commit556f00e4af55e78836c45f47b0662ab44bbb8b48 (patch)
treea5c315b35d400a397a35a86b86fe656d3a829af9 /server/src/queryhandler.cc
parent91d56787bec83a3a7c2ad6afd84d2b82c5d869b9 (diff)
Made fixes pointed out by GCC 4.2 and -D_FORTIFY_SOURCES=2
Diffstat (limited to 'server/src/queryhandler.cc')
-rw-r--r--server/src/queryhandler.cc7
1 files changed, 4 insertions, 3 deletions
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];