summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-29 09:53:45 +0000
committerLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-29 09:53:45 +0000
commit9e62c33d9ee58d7dcf1c667a77b3fdd814bc0943 (patch)
tree872a0cc972ddfc74e17afff9efc4065dc284401b /src/common
parent3b0f07f4b6d7ba237ba37a7d4ce627ded5581cad (diff)
downloadhercules-9e62c33d9ee58d7dcf1c667a77b3fdd814bc0943.tar.gz
hercules-9e62c33d9ee58d7dcf1c667a77b3fdd814bc0943.tar.bz2
hercules-9e62c33d9ee58d7dcf1c667a77b3fdd814bc0943.tar.xz
hercules-9e62c33d9ee58d7dcf1c667a77b3fdd814bc0943.zip
[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
Diffstat (limited to 'src/common')
-rw-r--r--src/common/grfio.c2
-rw-r--r--src/common/showmsg.c2
-rw-r--r--src/common/socket.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/common/grfio.c b/src/common/grfio.c
index 41e6864ae..aa677a0e5 100644
--- a/src/common/grfio.c
+++ b/src/common/grfio.c
@@ -68,7 +68,7 @@ typedef struct {
char type;
char fn[128-4*5]; // file name
char *fnd;
- char gentry; // read grf file select
+ signed char gentry; // read grf file select
} FILELIST;
//gentry ... 0 : It acquires from a local file.
// It acquires from the resource file of 1>=:gentry_table[gentry-1].
diff --git a/src/common/showmsg.c b/src/common/showmsg.c
index 7d940b189..03dcb7e8a 100644
--- a/src/common/showmsg.c
+++ b/src/common/showmsg.c
@@ -52,7 +52,7 @@ int _vShowMessage(enum msg_type flag, const char *string, va_list ap)
return 1;
}
- if (timestamp_format)
+ if (strlen(timestamp_format) > 0)
{ //Display time format. [Skotlex]
time_t t = time(NULL);
strftime(prefix, 80, timestamp_format, localtime(&t));
diff --git a/src/common/socket.c b/src/common/socket.c
index 2558e83ac..8fba86e0e 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -1210,7 +1210,7 @@ int RFIFOSKIP(int fd,int len)
s = session[fd];
- if (s->rdata_size-s->rdata_pos-len<0) {
+ if ((signed int)(s->rdata_size-s->rdata_pos-len)<0) {
//fprintf(stderr,"too many skip\n");
//exit(1);
//better than a COMPLETE program abort // TEST! :)