From 01a793e218c012d6355199f1edf345151f8d03ec Mon Sep 17 00:00:00 2001 From: wangyu Date: Wed, 20 Jun 2018 03:45:36 -0700 Subject: [PATCH] fix print format --- main.cpp | 7 +++++-- makefile | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/main.cpp b/main.cpp index 1f820b1..57b1593 100755 --- a/main.cpp +++ b/main.cpp @@ -829,9 +829,12 @@ int client_event_loop() if(cnt==0) log_bare(log_warn," [no ip found]"); if(d->description==0) { - log_bare(log_warn,"; (null)"); + log_bare(log_warn,"; (no description avaliable)"); + } + else + { + log_bare(log_warn,"; %s", d->description); } - log_bare(log_warn,"; %s", d->description); log_bare(log_warn,"\n"); } diff --git a/makefile b/makefile index 02f575f..b72f97d 100755 --- a/makefile +++ b/makefile @@ -61,6 +61,10 @@ mac_nolibnet:git_version rm -f ${NAME} ${cc_local} -o ${NAME} -I. ${SOURCES} ${PCAP} ${FLAGS} -ggdb -O2 -DNO_LIBNET +mac_nolibnet_static:git_version #it doesnt work + rm -f ${NAME} + ${cc_local} -o ${NAME} -I. ${SOURCES} -static-libstdc++ /usr/local/Cellar/libpcap/1.8.1/lib/libpcap.a ${FLAGS} -ggdb -O2 -DNO_LIBNET + fast: git_version rm -f ${NAME} ${cc_local} -o ${NAME} -I. ${SOURCES} ${FLAGS} -lrt -ggdb