]> mj.ucw.cz Git - libucw.git/blobdiff - lib/qache.c
XML: Small bugfix in xml_merge_chars.
[libucw.git] / lib / qache.c
index 095925df54754085cfa9a4365ac378c7d2c03361..91536bf7a0df2d9d5a259df63680dcb03fafb0c6 100644 (file)
@@ -60,7 +60,7 @@ struct qache {
   int fd;
   byte *mmap_data;
   uns file_size;
-  byte *file_name;
+  char *file_name;
   uns locked;
 };
 
@@ -68,10 +68,10 @@ struct qache {
 #define first_free_block entry_table[0].first_data_block
 #define num_free_blocks entry_table[0].data_len
 
-static inline byte *
+static inline char *
 format_key(qache_key_t *key)
 {
-  static byte keybuf[2*sizeof(qache_key_t)+1];
+  static char keybuf[2*sizeof(qache_key_t)+1];
   for (uns i=0; i<sizeof(qache_key_t); i++)
     sprintf(keybuf+2*i, "%02x", (*key)[i]);
   return keybuf;
@@ -86,7 +86,7 @@ qache_msync(struct qache *q UNUSED, uns start UNUSED, uns len UNUSED)
   start -= start % CPU_PAGE_SIZE;
   len = ALIGN_TO(len, CPU_PAGE_SIZE);
   if (msync(q->mmap_data + start, len, MS_ASYNC | MS_INVALIDATE) < 0)
-    log(L_ERROR, "Cache %s: msync failed: %m", q->file_name);
+    msg(L_ERROR, "Cache %s: msync failed: %m", q->file_name);
 #endif
 }
 
@@ -128,7 +128,7 @@ enum entry_audit_flags {
   ET_HASH = 4
 };
 
-static byte *
+static char *
 audit_entries(struct qache *q, byte *entrymap)
 {
   uns i, j;
@@ -184,7 +184,7 @@ enum block_audit_flags {
   BT_ALLOC = 2
 };
 
-static byte *
+static char *
 audit_blocks(struct qache *q, byte *entrymap, byte *blockmap)
 {
   uns i, j;
@@ -226,7 +226,7 @@ audit_blocks(struct qache *q, byte *entrymap, byte *blockmap)
   return NULL;
 }
 
-static byte *
+static char *
 do_audit(struct qache *q)
 {
   byte *entry_map = xmalloc_zero(q->hdr->max_entries);
@@ -255,7 +255,7 @@ qache_open_existing(struct qache *q, struct qache_params *par)
     return 0;
 
   struct stat st;
-  byte *err = "stat failed";
+  char *err = "stat failed";
   if (fstat(q->fd, &st) < 0)
     goto close_and_fail;
 
@@ -727,7 +727,7 @@ qache_debug(struct qache *q)
 void
 qache_audit(struct qache *q)
 {
-  byte *err;
+  char *err;
   qache_lock(q);
   if (err = do_audit(q))
     die("Cache %s: %s", q->file_name, err);
@@ -777,7 +777,7 @@ int main(int argc UNUSED, char **argv UNUSED)
          found++;
        }
     }
-  log(L_INFO, "Found %d of %d entries", found, N);
+  msg(L_INFO, "Found %d of %d entries", found, N);
 
   qache_close(q, 1);
   return 0;