svn commit: samba r2623 - in branches/SAMBA_4_0/source/lib/registry/common: .

tridge at samba.org tridge at samba.org
Sat Sep 25 11:17:09 GMT 2004


Author: tridge
Date: 2004-09-25 11:17:09 +0000 (Sat, 25 Sep 2004)
New Revision: 2623

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source/lib/registry/common&rev=2623&nolog=1

Log:
don't do pointer arithmetic on void*, as it doesn't work with non-GNU compilers



Modified:
   branches/SAMBA_4_0/source/lib/registry/common/reg_util.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/registry/common/reg_util.c
===================================================================
--- branches/SAMBA_4_0/source/lib/registry/common/reg_util.c	2004-09-25 11:16:30 UTC (rev 2622)
+++ branches/SAMBA_4_0/source/lib/registry/common/reg_util.c	2004-09-25 11:17:09 UTC (rev 2623)
@@ -54,7 +54,7 @@
 	  asciip = ret;
 	  for (i=0; i<v->data_len; i++) { 
 		  int str_rem = v->data_len * 3 - (asciip - ret);
-		  asciip += snprintf(asciip, str_rem, "%02x", *(uint8_t *)(v->data_blk+i));
+		  asciip += snprintf(asciip, str_rem, "%02x", *(uint8_t *)(((char *)v->data_blk)+i));
 		  if (i < v->data_len && str_rem > 0)
 			  *asciip = ' '; asciip++;	
 	  }



More information about the samba-cvs mailing list