From 8a023e0c069448b3d6de6dc803ec224851e6ae3c Mon Sep 17 00:00:00 2001 From: luis Date: Fri, 29 Mar 2013 16:34:53 +0000 Subject: [PATCH] Merge r27958 from nmap-npingchanges: Simplify print() in RawData:: --- libnetutil/RawData.cc | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/libnetutil/RawData.cc b/libnetutil/RawData.cc index 1e01603ba..6cef9cda5 100644 --- a/libnetutil/RawData.cc +++ b/libnetutil/RawData.cc @@ -162,16 +162,8 @@ int RawData::validate(){ * header in the chain (if there is any). * @return OP_SUCCESS on success and OP_FAILURE in case of error. */ int RawData::print(FILE *output, int detail) const { - - if(detail<=PRINT_DETAIL_MED){ - fprintf(output, "Data["); - fprintf(output, "%d byte%s]", this->length, (this->length!=1)? "s":""); - }else{ - // Print hex dump - fprintf(output, "Data[--HEXDUMP-- %d byte%s]", this->length, (this->length!=1)? "s":""); - // @todo UNIMPLEMENTED. I don't want to use libnetutil's print_hexdump() - // here because it introduces dependencies. - } + fprintf(output, "Payload["); + fprintf(output, "%d byte%s]", this->length, (this->length!=1)? "s":""); if(this->next!=NULL){ print_separator(output, detail); next->print(output, detail);