mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[10822] Fixed "unsigned is never < 0" warning.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
5f099d5fc0
commit
9e071e4483
2 changed files with 5 additions and 5 deletions
|
|
@ -4961,7 +4961,7 @@ bool ChatHandler::HandleServerShutDownCommand(char* args)
|
|||
// Exit code should be in range of 0-125, 126-255 is used
|
||||
// in many shells for their own return codes and code > 255
|
||||
// is not supported in many others
|
||||
if (exitcode < 0 || exitcode > 125)
|
||||
if (exitcode > 125)
|
||||
return false;
|
||||
|
||||
sWorld.ShutdownServ (delay, 0, exitcode);
|
||||
|
|
@ -4981,7 +4981,7 @@ bool ChatHandler::HandleServerRestartCommand(char* args)
|
|||
// Exit code should be in range of 0-125, 126-255 is used
|
||||
// in many shells for their own return codes and code > 255
|
||||
// is not supported in many others
|
||||
if (exitcode < 0 || exitcode > 125)
|
||||
if (exitcode > 125)
|
||||
return false;
|
||||
|
||||
sWorld.ShutdownServ(delay, SHUTDOWN_MASK_RESTART, exitcode);
|
||||
|
|
@ -5001,7 +5001,7 @@ bool ChatHandler::HandleServerIdleRestartCommand(char* args)
|
|||
// Exit code should be in range of 0-125, 126-255 is used
|
||||
// in many shells for their own return codes and code > 255
|
||||
// is not supported in many others
|
||||
if (exitcode < 0 || exitcode > 125)
|
||||
if (exitcode > 125)
|
||||
return false;
|
||||
|
||||
sWorld.ShutdownServ(delay, SHUTDOWN_MASK_RESTART|SHUTDOWN_MASK_IDLE, exitcode);
|
||||
|
|
@ -5021,7 +5021,7 @@ bool ChatHandler::HandleServerIdleShutDownCommand(char* args)
|
|||
// Exit code should be in range of 0-125, 126-255 is used
|
||||
// in many shells for their own return codes and code > 255
|
||||
// is not supported in many others
|
||||
if (exitcode < 0 || exitcode > 125)
|
||||
if (exitcode > 125)
|
||||
return false;
|
||||
|
||||
sWorld.ShutdownServ(delay, SHUTDOWN_MASK_IDLE, exitcode);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10821"
|
||||
#define REVISION_NR "10822"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue