Fix standard C++ 11 issues

This commit is contained in:
Michele Guerini Rocco 2023-06-17 09:25:35 +02:00
parent 6a18c72b0c
commit 533868b21e
Signed by: rnhmjoj
GPG Key ID: BFBAF4C975F76450
4 changed files with 6 additions and 5 deletions

View File

@ -43,7 +43,7 @@ void printUsage(char*);
static void daemonize();
int main(int argc, char** argv) {
char* fileName = "route.conf";
char* fileName = (char*)"route.conf";
int op;
if (getuid()) {

View File

@ -55,6 +55,7 @@ class FakeroutePacket {
public:
FakeroutePacket(u_int16_t receivedSourcePort, u_int16_t receivedDestinationPort,
char* spoofedSourceAddress, char* spoofedDestinationAddress);
virtual ~FakeroutePacket();
virtual void sendOn(int fd);
};

View File

@ -52,7 +52,7 @@ void TracerouteListener::listen(class TracerouteEvents &tracerouteEvents) {
for (i=0;i<FD_COUNT;i++) {
if ((fds[i].revents & POLLIN == POLLIN) ||
(fds[i].revents & POLLPRI == POLLPRI)) {
(fds[i].revents & POLLPRI == POLLPRI)) {
activeFds[index++] = fds[i].fd;
}
}

View File

@ -44,10 +44,10 @@
*/
unsigned short in_cksum(unsigned short *addr,int len)
{
register int sum = 0;
int sum = 0;
u_short answer = 0;
register u_short *w = addr;
register int nleft = len;
u_short *w = addr;
int nleft = len;
/*
* Our algorithm is simple, using a 32 bit accumulator (sum), we add