Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/util/labelanalysis.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion toolkits/graph_analytics/label_analysis.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down