1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

DtUtil1: fix a pointer casting issue.

This commit is contained in:
Liang Chang 2022-04-15 13:33:24 -04:00
parent a046a95d81
commit c3b1d645a9

View file

@ -167,15 +167,15 @@ _DtShmProtoAddStrtab(DtShmProtoStrtab strlist, const char * string, int * isnew)
{
strlist_t * ptr = (strlist_t *) strlist;
int * bucket = (int *) _DtUtilGetHash(ptr->sl_hash, (const unsigned char *)string);
intptr_t * bucket = (intptr_t *) _DtUtilGetHash(ptr->sl_hash, (const unsigned char *)string);
int ret = *bucket;
intptr_t ret = *bucket;
if(*bucket == 0) /* new */ {
unsigned char ** sptr;
*isnew = 1;
*bucket = ret = ptr->sl_charcount;
sptr = (unsigned char**)_DtUtilGetHash(ptr->sl_bosons, (const unsigned char *) (intptr_t) ret);
sptr = (unsigned char**)_DtUtilGetHash(ptr->sl_bosons, (const unsigned char *)ret);
*sptr = (unsigned char*)strdup(string);
ptr->sl_charcount += strlen(string) + 1;
}