$OpenBSD: patch-src_WWW_cpp,v 1.1 2018/04/11 18:15:59 jasper Exp $

From 7691fcc7ddf0474bd9cd2de4f6db927b8be93bd4 Mon Sep 17 00:00:00 2001
From: Stephen Kitt <steve@sk2.org>
Date: Mon, 7 Aug 2017 13:01:35 +0200
Subject: [PATCH] Avoid comparing pointers with booleans

Index: src/WWW.cpp
--- src/WWW.cpp.orig
+++ src/WWW.cpp
@@ -206,7 +206,7 @@ void FSWeb::downloadFile(const std::string &p_local_fi
   std::string v_www_agent = WWW_AGENT;
 
   /* open the file */
-  if( (v_destinationFile = fopen(v_local_file_tmp.c_str(), "wb")) == false) {
+  if( (v_destinationFile = fopen(v_local_file_tmp.c_str(), "wb")) == NULL) {
     throw Exception("error : unable to open output file " 
         + v_local_file_tmp);
   }
@@ -320,7 +320,7 @@ void FSWeb::uploadReplay(const std::string& p_replayFi
   LogInfo(std::string("Uploading replay " + p_replayFilename).c_str());
 
   /* open the file */
-  if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == false) {
+  if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == NULL) {
     throw Exception("error : unable to open output file " DEFAULT_WWW_MSGFILE("UR"));
   }
       
@@ -478,7 +478,7 @@ void FSWeb::sendVote(const std::string& p_id_level,
   LogInfo("Sending vote");
 
   /* open the file */
-  if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == false) {
+  if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == NULL) {
     throw Exception("error : unable to open output file " DEFAULT_WWW_MSGFILE("SV"));
   }
       
@@ -562,7 +562,7 @@ void FSWeb::sendReport(const std::string& p_reportauth
   LogInfo("Sending report");
 
   /* open the file */
-  if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == false) {
+  if( (v_destinationFile = fopen(v_local_file.c_str(), "wb")) == NULL) {
     throw Exception("error : unable to open output file " DEFAULT_WWW_MSGFILE("SR"));
   }
       
@@ -677,7 +677,7 @@ void FSWeb::uploadDbSync(const std::string& p_dbSyncFi
   LogInfo(std::string("Uploading dbsync " + p_dbSyncFilename + " to " + p_url_to_transfert).c_str());
 
   /* open the file */
-  if( (v_destinationFile = fopen(p_answerFile.c_str(), "wb")) == false) {
+  if( (v_destinationFile = fopen(p_answerFile.c_str(), "wb")) == NULL) {
     throw Exception("error : unable to open output file " + p_answerFile);
   }
       
