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:
parent
a046a95d81
commit
c3b1d645a9
1 changed files with 3 additions and 3 deletions
|
@ -167,15 +167,15 @@ _DtShmProtoAddStrtab(DtShmProtoStrtab strlist, const char * string, int * isnew)
|
||||||
{
|
{
|
||||||
strlist_t * ptr = (strlist_t *) strlist;
|
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 */ {
|
if(*bucket == 0) /* new */ {
|
||||||
unsigned char ** sptr;
|
unsigned char ** sptr;
|
||||||
*isnew = 1;
|
*isnew = 1;
|
||||||
*bucket = ret = ptr->sl_charcount;
|
*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);
|
*sptr = (unsigned char*)strdup(string);
|
||||||
ptr->sl_charcount += strlen(string) + 1;
|
ptr->sl_charcount += strlen(string) + 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue