Skip to content

Commit

Permalink
Merge pull request #107 from maxmind/greg/fix-exit-code
Browse files Browse the repository at this point in the history
Fix exit code when there are no updates
  • Loading branch information
horgh authored Aug 14, 2018
2 parents a8c3462 + cddabc6 commit a308cb5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
GeoIP Update Change Log
=======================

3.0.1 (2018-08-14)
------------------

* When there were no updates available, 3.0.0 incorrectly returned an
exit code of 1 instead of 0. This release reverts to the pre-3.0.0
behavior, returning an exit code of 0 in this case.

3.0.0 (2018-08-13)
------------------

Expand Down
2 changes: 1 addition & 1 deletion bin/geoipupdate.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ int main(int argc, char *const argv[]) {
geoipupdate_s_delete(gu);
}
curl_global_cleanup();
return err ? GU_ERROR : GU_OK;
return err & GU_ERROR ? GU_ERROR : GU_OK;
}

static ssize_t my_getline(char **linep, size_t *linecapp, FILE *stream) {
Expand Down

0 comments on commit a308cb5

Please sign in to comment.