remove compiler warning

git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@788 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
Jay Sorg 2004-10-27 00:49:54 +00:00
parent 78710116bc
commit 3ad942b774

15
cache.c
View File

@ -189,15 +189,8 @@ cache_get_text(uint8 cache_id)
{
DATABLOB *text;
if (cache_id < NUM_ELEMENTS(g_textcache))
{
text = &g_textcache[cache_id];
if (text->data != NULL)
return text;
}
error("get text %d\n", cache_id);
return NULL;
}
/* Store a text item in the cache */
@ -206,20 +199,12 @@ cache_put_text(uint8 cache_id, void *data, int length)
{
DATABLOB *text;
if (cache_id < NUM_ELEMENTS(g_textcache))
{
text = &g_textcache[cache_id];
if (text->data != NULL)
xfree(text->data);
text->data = xmalloc(length);
text->size = length;
memcpy(text->data, data, length);
}
else
{
error("put text %d\n", cache_id);
}
}