From: Kern Sibbald Date: Fri, 29 Aug 2008 09:16:11 +0000 (+0000) Subject: Fix compile warning in new dbcheck port code. X-Git-Tag: Release-3.0.0~1048 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=60459f54fb50e452cb015fccd790c971022faf3c;p=bacula%2Fbacula 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 --- 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.