Skip to content

Commit

Permalink
[10822] Fixed "unsigned is never < 0" warning.
Browse files Browse the repository at this point in the history
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
  • Loading branch information
Vinolentus authored and VladimirMangos committed Dec 4, 2010
1 parent 0266076 commit 5bcfc5f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/game/Level3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "10821"
#define REVISION_NR "10822"
#endif // __REVISION_NR_H__

0 comments on commit 5bcfc5f

Please sign in to comment.