From: Antonio Valentino Date: Mon, 7 Aug 2017 06:32:29 +0000 Subject: fix build Forwarded: https://github.com/TUDelftGeodesy/Doris/pull/5 --- doris_core/bk_messages.hh | 2 +- sar_tools/cpxfiddle.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doris_core/bk_messages.hh b/doris_core/bk_messages.hh index 0644f8e..7e0368e 100755 --- a/doris_core/bk_messages.hh +++ b/doris_core/bk_messages.hh @@ -211,7 +211,7 @@ class bk_messages if (strlen(id)>=10) { strncpy(name_,id, 9); - strcat(name_,'\0');// terminate id + name_[9] = '\0';// terminate id } else { diff --git a/sar_tools/cpxfiddle.cc b/sar_tools/cpxfiddle.cc index 2e5c84e..6a3cd92 100644 --- a/sar_tools/cpxfiddle.cc +++ b/sar_tools/cpxfiddle.cc @@ -1854,7 +1854,7 @@ static struct option const long_options[] = // filename: last argument // cerr << "OPTARG: " << argv[argc-1] << endl; // cerr << "OPTARG: " << argv[optind] << endl; - if (argv[optind]=='\0') + if (argv[optind]==0 || argv[optind][0]=='\0') { cerr << argv[0] << ": ERROR: No input file specified.\n"; return false;