From 9e62c33d9ee58d7dcf1c667a77b3fdd814bc0943 Mon Sep 17 00:00:00 2001 From: Lance Date: Mon, 29 May 2006 09:53:45 +0000 Subject: [Optimized] - Removed unused checks for unsigned data type and possible logic error for char type (gcc treats char as unsigned). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6814 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/atcommand.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/map/atcommand.c') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 40c957ae6..4b61c5f74 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -2466,7 +2466,7 @@ int atcommand_kami( return -1; } - if(color < 0 || color > 0xFFFFFF) { + if(color > 0xFFFFFF) { clif_displaymessage(fd, "Invalid color."); return -1; } @@ -6199,9 +6199,6 @@ char * txt_time(unsigned int duration) { memset(temp, '\0', sizeof(temp)); memset(temp1, '\0', sizeof(temp1)); - if (duration < 0) - duration = 0; - days = duration / (60 * 60 * 24); duration = duration - (60 * 60 * 24 * days); hours = duration / (60 * 60); @@ -7770,7 +7767,7 @@ int atcommand_autoloot(const int fd, struct map_session_data* sd, const char* co rate = atoi(message) * 100; // check for invalid value - if(rate < 0 || rate > 10000) + if(rate > 10000) { clif_displaymessage(fd, "Invalid value. Choose value between 0 and 100."); return 0; -- cgit v1.2.3-70-g09d2