Browse Source

tdb2: fix arithmetic on void * pointer.

Rusty Russell 15 years ago
parent
commit
f2a1247955
1 changed files with 1 additions and 1 deletions
  1. 1 1
      ccan/tdb2/io.c

+ 1 - 1
ccan/tdb2/io.c

@@ -342,7 +342,7 @@ enum TDB_ERROR tdb_write_off(struct tdb_context *tdb,
 static void *_tdb_alloc_read(struct tdb_context *tdb, tdb_off_t offset,
 static void *_tdb_alloc_read(struct tdb_context *tdb, tdb_off_t offset,
 			     tdb_len_t len, unsigned int prefix)
 			     tdb_len_t len, unsigned int prefix)
 {
 {
-	void *buf;
+	unsigned char *buf;
 	enum TDB_ERROR ecode;
 	enum TDB_ERROR ecode;
 
 
 	/* some systems don't like zero length malloc */
 	/* some systems don't like zero length malloc */