From 60459f54fb50e452cb015fccd790c971022faf3c Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Fri, 29 Aug 2008 09:16:11 +0000 Subject: [PATCH] Fix compile warning in new dbcheck port code. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7525 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/tools/dbcheck.c | 3 ++- bacula/technotes-2.5 | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bacula/src/tools/dbcheck.c b/bacula/src/tools/dbcheck.c index 48769c8133..0b1c276252 100644 --- a/bacula/src/tools/dbcheck.c +++ b/bacula/src/tools/dbcheck.c @@ -262,11 +262,12 @@ int main (int argc, char *argv[]) user = argv[2]; password = argv[3]; dbhost = argv[4]; + errno = 0; dbport = strtol(argv[5], &endptr, 10); if (*endptr != '\0') { Pmsg0(0, _("Database port must be a numeric value.\n")); exit(1); - } else if (dbport == LONG_MIN || dbport == LONG_MAX) { + } else if (errno == ERANGE) { Pmsg0(0, _("Database port must be a int value.\n")); exit(1); } diff --git a/bacula/technotes-2.5 b/bacula/technotes-2.5 index 47682f1f14..7bfaa5aca1 100644 --- a/bacula/technotes-2.5 +++ b/bacula/technotes-2.5 @@ -33,6 +33,7 @@ separator in console (!$%&'()*+,-/:;<>?[]^`{|}~) General: 29Aug08 +kes Fix compile warning in new dbcheck port code. kes Fix migration code broken by previous virtual backup fix. 28Aug08 kes Fix problem of Virtual backup not writing a sequential FileIndex. -- 2.39.5