From 2cbd36443e0066ff196966702e084a31c7e23cb7 Mon Sep 17 00:00:00 2001 From: batrick Date: Sun, 26 Jun 2016 21:34:58 +0000 Subject: [PATCH] Fix indentation leading to gcc warnings. --- nping/Crypto.cc | 2 +- nping/NpingTarget.cc | 2 +- nping/ProbeMode.cc | 50 ++++++++++++++++++++++---------------------- nping/utils_net.cc | 6 +++--- 4 files changed, 30 insertions(+), 30 deletions(-) diff --git a/nping/Crypto.cc b/nping/Crypto.cc index be845288b..0524652f6 100644 --- a/nping/Crypto.cc +++ b/nping/Crypto.cc @@ -199,7 +199,7 @@ int Crypto::aes128_cbc_encrypt(u8 *inbuff, size_t inlen, u8 *dst_buff, u8 *key, /* Do not encrypt, just set the plaintext */ for(size_t i=0; isetNextElement( next_element ); + /* Set datagram payload */ + i->setNextElement( next_element ); - i->setVersion(); - i->setTrafficClass( o.getTrafficClass() ); - i->setFlowLabel( o.getFlowLabel() ); - i->setNextHeader(next_proto); - i->setPayloadLength(); - i->setDestinationAddress( target->getIPv6Address_u8() ); + i->setVersion(); + i->setTrafficClass( o.getTrafficClass() ); + i->setFlowLabel( o.getFlowLabel() ); + i->setNextHeader(next_proto); + i->setPayloadLength(); + i->setDestinationAddress( target->getIPv6Address_u8() ); - /* Hop Limit */ - if ( o.issetTraceroute() ){ - i->setHopLimit( o.getCurrentRound() ); - }else{ - i->setHopLimit( o.getHopLimit() ); - } + /* Hop Limit */ + if ( o.issetTraceroute() ){ + i->setHopLimit( o.getCurrentRound() ); + }else{ + i->setHopLimit( o.getHopLimit() ); + } - /* Source IP */ - if( o.issetIPv6SourceAddress() ){ - i->setSourceAddress( o.getIPv6SourceAddress() ); - }else{ - if ( target->getIPv6SourceAddress_u8() != NULL ) - i->setSourceAddress( target->getIPv6SourceAddress_u8() ); - else - nping_fatal(QT_3, "createIPv6(): Cannot determine Source IPv6 Address"); - } - return OP_SUCCESS; + /* Source IP */ + if( o.issetIPv6SourceAddress() ){ + i->setSourceAddress( o.getIPv6SourceAddress() ); + }else{ + if ( target->getIPv6SourceAddress_u8() != NULL ) + i->setSourceAddress( target->getIPv6SourceAddress_u8() ); + else + nping_fatal(QT_3, "createIPv6(): Cannot determine Source IPv6 Address"); + } + return OP_SUCCESS; } /* End of createIPv6() */ diff --git a/nping/utils_net.cc b/nping/utils_net.cc index 2f279c27b..80517d10e 100644 --- a/nping/utils_net.cc +++ b/nping/utils_net.cc @@ -1486,9 +1486,9 @@ int obtainRawSocket(){ }else{ if ((rawipsd = socket(AF_INET, SOCK_RAW, IPPROTO_RAW)) < 0 ) nping_fatal(QT_3,"Couldn't acquire IPv4 raw socket. Are you root?"); - /* Tell the kernel we are including our own IP Header (call to - * setsockopt passing option IP_HDRINCL) */ - sethdrinclude(rawipsd); + /* Tell the kernel we are including our own IP Header (call to + * setsockopt passing option IP_HDRINCL) */ + sethdrinclude(rawipsd); } /* Allow broadcast addresses */