From bb0a29d5e2650da88e946117cacb87f95fc3919e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Cla=C3=9Fen?= Date: Wed, 27 Apr 2016 00:34:27 +0200 Subject: [PATCH] Fixed compile error --- src/util/labelanalysis.hpp | 2 +- toolkits/graph_analytics/label_analysis.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/labelanalysis.hpp b/src/util/labelanalysis.hpp index b87a4fd6..c83a3195 100644 --- a/src/util/labelanalysis.hpp +++ b/src/util/labelanalysis.hpp @@ -166,7 +166,7 @@ void analyze_labels(std::string basefilename, int printtop = 20) { std::string outname = basefilename + ".components"; std::ofstream resf; resf.open(outname.c_str()); - if (resf == NULL) { + if (!resf) { logstream(LOG_ERROR) << "Could not write label outputfile : " << outname << std::endl; return; } diff --git a/toolkits/graph_analytics/label_analysis.hpp b/toolkits/graph_analytics/label_analysis.hpp index 05e73385..dd6202b1 100644 --- a/toolkits/graph_analytics/label_analysis.hpp +++ b/toolkits/graph_analytics/label_analysis.hpp @@ -157,7 +157,7 @@ void analyze_labels2(std::string base_filename, FILE * pfile, int printtop = 20) /* Write output file */ std::string outname = base_filename + "_components.txt"; FILE * resf = fopen(outname.c_str(), "w"); - if (resf == NULL) { + if (!resf) { logstream(LOG_ERROR) << "Could not write label outputfile : " << outname << std::endl; return; }