[haiku-commits] haiku: hrev50922 - src/apps/haikudepot/server

  • From: apl@xxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 31 Jan 2017 09:19:09 +0100 (CET)

hrev50922 adds 1 changeset to branch 'master'
old head: 0c1bbfe508784e219d8e9f939ddd1bb787e26e4e
new head: 1290dd9132714f1107ee85b9539aee834b874156
overview: 
http://cgit.haiku-os.org/haiku/log/?qt=range&q=1290dd913271+%5E0c1bbfe50878

----------------------------------------------------------------------------

1290dd913271: HaikuDepot: changes from code review from Jessica

                                    [ Andrew Lindesay <apl@xxxxxxxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev50922
Commit:      1290dd9132714f1107ee85b9539aee834b874156
URL:         http://cgit.haiku-os.org/haiku/commit/?id=1290dd913271
Author:      Andrew Lindesay <apl@xxxxxxxxxxxxxx>
Date:        Tue Jan 31 08:18:39 2017 UTC

----------------------------------------------------------------------------

1 file changed, 2 insertions(+), 2 deletions(-)
src/apps/haikudepot/server/ServerIconExportUpdateProcess.cpp | 4 ++--

----------------------------------------------------------------------------

diff --git a/src/apps/haikudepot/server/ServerIconExportUpdateProcess.cpp 
b/src/apps/haikudepot/server/ServerIconExportUpdateProcess.cpp
index 4e6e54c..36afa2b 100644
--- a/src/apps/haikudepot/server/ServerIconExportUpdateProcess.cpp
+++ b/src/apps/haikudepot/server/ServerIconExportUpdateProcess.cpp
@@ -195,7 +195,7 @@ ServerIconExportUpdateProcess::_Download(BPath& 
tarGzFilePath, const BUrl& url,
                const BHttpHeaders responseHeaders = result.Headers();
                const char *locationValue = responseHeaders["Location"];
 
-               if (NULL != locationValue && 0 != strlen(locationValue)) {
+               if (locationValue != NULL && strlen(locationValue) != 0) {
                        BUrl location(locationValue);
                        fprintf(stdout, "will redirect to; %s\n",
                                location.UrlString().String());
@@ -205,7 +205,7 @@ ServerIconExportUpdateProcess::_Download(BPath& 
tarGzFilePath, const BUrl& url,
                fprintf(stdout, "unable to find 'Location' header for 
redirect\n");
                return B_IO_ERROR;
        } else {
-               if (0 == statusCode || 5 == (statusCode / 100)) {
+               if (statusCode == 0 || (statusCode / 100) == 5) {
                        fprintf(stdout, "error response from server; %" 
B_PRId32 " --> "
                                "retry...\n", statusCode);
                        return _Download(tarGzFilePath, url, redirects, 
failures + 1);


Other related posts:

  • » [haiku-commits] haiku: hrev50922 - src/apps/haikudepot/server - apl