CVS: rdesktop cache.c,1.20,1.21

Jay Sorg <[email protected]>
Newsgroups gmane.network.rdesktop.cvs
Message-ID <[email protected]>
Update of /cvsroot/rdesktop/rdesktop
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24069

Modified Files:
	cache.c 
Log Message:
remove compiler warning

Index: cache.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/cache.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** cache.c	2 Oct 2004 01:36:20 -0000	1.20
--- cache.c	27 Oct 2004 00:49:54 -0000	1.21
***************
*** 190,202 ****
  	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;
  }
  
--- 190,195 ----
  	DATABLOB *text;
  
! 	text = &g_textcache[cache_id];
! 	return text;
  }
  
***************
*** 207,224 ****
  	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);
! 	}
  }
  
--- 200,209 ----
  	DATABLOB *text;
  
! 	text = &g_textcache[cache_id];
! 	if (text->data != NULL)
! 		xfree(text->data);
! 	text->data = xmalloc(length);
! 	text->size = length;
! 	memcpy(text->data, data, length);
  }
  



-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.