]> mj.ucw.cz Git - libucw.git/blobdiff - lib/conf-section.c
Merge with git+ssh://git.ucw.cz/projects/sherlock/GIT/sherlock.git
[libucw.git] / lib / conf-section.c
index b06b9fd6bca499534966740ed1b3c3c42c6baf8f..bbd3416426ef5ddc643928cfb739cd07bf34102f 100644 (file)
@@ -140,11 +140,11 @@ cf_init_section(byte *name, struct cf_section *sec, void *ptr, uns do_bzero)
   }
   for (struct cf_item *ci=sec->cfg; ci->cls; ci++)
     if (ci->cls == CC_SECTION)
-      cf_init_section(ci->name, ci->u.sec, ptr + (addr_int_t) ci->ptr, 0);
+      cf_init_section(ci->name, ci->u.sec, ptr + (uintptr_t) ci->ptr, 0);
     else if (ci->cls == CC_LIST)
-      clist_init(ptr + (addr_int_t) ci->ptr);
+      clist_init(ptr + (uintptr_t) ci->ptr);
     else if (ci->cls == CC_DYNAMIC) {
-      void **dyn = ptr + (addr_int_t) ci->ptr;
+      void **dyn = ptr + (uintptr_t) ci->ptr;
       if (!*dyn) {                     // replace NULL by an empty array
        static uns zero = 0;
        *dyn = (&zero) + 1;
@@ -163,13 +163,13 @@ commit_section(struct cf_section *sec, void *ptr, uns commit_all)
   byte *err;
   for (struct cf_item *ci=sec->cfg; ci->cls; ci++)
     if (ci->cls == CC_SECTION) {
-      if ((err = commit_section(ci->u.sec, ptr + (addr_int_t) ci->ptr, commit_all))) {
+      if ((err = commit_section(ci->u.sec, ptr + (uintptr_t) ci->ptr, commit_all))) {
        log(L_ERROR, "Cannot commit section %s: %s", ci->name, err);
        return "commit of a subsection failed";
       }
     } else if (ci->cls == CC_LIST) {
       uns idx = 0;
-      CLIST_FOR_EACH(cnode *, n, * (clist*) (ptr + (addr_int_t) ci->ptr))
+      CLIST_FOR_EACH(cnode *, n, * (clist*) (ptr + (uintptr_t) ci->ptr))
        if (idx++, err = commit_section(ci->u.sec, n, commit_all)) {
          log(L_ERROR, "Cannot commit node #%d of list %s: %s", idx, ci->name, err);
          return "commit of a list failed";