diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-06-25 20:36:46 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-06-25 20:36:46 +0000 |
commit | 12b89d8501fe2a86297ee1df993368eda4a7fb81 (patch) | |
tree | b84a4ffbcce65cac30c01524ef5c051668c172cf /src/util/StoreHandledData.c | |
parent | e1b1ed9aaab66518a33dd5e344f20bfe4c38c16e (diff) |
Fixing some compiler warnings.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2250 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/util/StoreHandledData.c')
-rw-r--r-- | src/util/StoreHandledData.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/util/StoreHandledData.c b/src/util/StoreHandledData.c index 3d4da049..c501ea2f 100644 --- a/src/util/StoreHandledData.c +++ b/src/util/StoreHandledData.c @@ -156,7 +156,7 @@ int Util_DeleteHandle(cHandledData *storage, int handle) { int return_code; - if((handle < storage->array_size)&&(handle >= 0)) + if((handle >= 0)&&((unsigned int)handle < storage->array_size)) { /* It's a valid handle. */ storage->array[handle].in_use = FALSE; @@ -164,7 +164,7 @@ int Util_DeleteHandle(cHandledData *storage, int handle) free(storage->array[handle].name); storage->array[handle].name = NULL; - if(handle < storage->first_unused) + if((unsigned int)handle < storage->first_unused) { storage->first_unused = handle; }; @@ -201,7 +201,7 @@ int Util_DeleteHandle(cHandledData *storage, int handle) static int FindNextUnused(cHandledData *storage, int first) { - int current; + unsigned int current; current = first+1; @@ -238,8 +238,8 @@ void *Util_GetHandledData(cHandledData *storage, int handle) if(storage) { - if((handle < storage->array_size)&& - (handle >= 0)&& + if((handle >= 0)&& + ((unsigned int)handle < storage->array_size)&& (storage->array[handle].in_use == TRUE)) { /* The data exists */ @@ -278,7 +278,7 @@ void *Util_GetHandledData(cHandledData *storage, int handle) int Util_GetHandle(cHandledData *storage, const char *name, void **data) { int handle; - int current; + unsigned int current; handle = -1; @@ -334,8 +334,8 @@ char *Util_GetHandleName(cHandledData *storage, int handle) if(storage) { - if((handle < storage->array_size)&& - (handle >= 0)&& + if((handle >= 0)&& + ((unsigned int)handle < storage->array_size)&& (storage->array[handle].in_use == TRUE)) { /* The data exists */ |