allocations.allocated -= size;
allocations.allocations--;
- debug(D_MEMORY, "MEMORY: freed %zu bytes for %s/%u@%s."
+ debug(D_MEMORY, "MEMORY: freed %zu bytes for %s/%d@%s."
" Status: allocated %zu in %zu allocs."
, size
, function, line, file
allocations.allocated += size;
allocations.allocated -= old_size;
- debug(D_MEMORY, "MEMORY: Re-allocated from %zu to %zu bytes for %s/%u@%s."
+ debug(D_MEMORY, "MEMORY: Re-allocated from %zu to %zu bytes for %s/%d@%s."
" Status: allocated %zu in %zu allocs."
, old_size, size
, function, line, file
return NULL;
}
- snprintfz(w->compare, MAX_COMPARE_NAME, "%d", uid);
+ snprintfz(w->compare, MAX_COMPARE_NAME, "%u", uid);
w->comparehash = simple_hash(w->compare);
w->comparelen = strlen(w->compare);
- snprintfz(w->id, MAX_NAME, "%d", uid);
+ snprintfz(w->id, MAX_NAME, "%u", uid);
w->idhash = simple_hash(w->id);
struct passwd *pw = getpwuid(uid);
if(!pw)
- snprintfz(w->name, MAX_NAME, "%d", uid);
+ snprintfz(w->name, MAX_NAME, "%u", uid);
else
snprintfz(w->name, MAX_NAME, "%s", pw->pw_name);
return NULL;
}
- snprintfz(w->compare, MAX_COMPARE_NAME, "%d", gid);
+ snprintfz(w->compare, MAX_COMPARE_NAME, "%u", gid);
w->comparehash = simple_hash(w->compare);
w->comparelen = strlen(w->compare);
- snprintfz(w->id, MAX_NAME, "%d", gid);
+ snprintfz(w->id, MAX_NAME, "%u", gid);
w->idhash = simple_hash(w->id);
struct group *gr = getgrgid(gid);
if(!gr)
- snprintfz(w->name, MAX_NAME, "%d", gid);
+ snprintfz(w->name, MAX_NAME, "%u", gid);
else
snprintfz(w->name, MAX_NAME, "%s", gr->gr_name);
all_pids[pid] = calloc(sizeof(struct pid_stat), 1);
if(!all_pids[pid]) {
- error("Cannot allocate %lu bytes of memory", (unsigned long)sizeof(struct pid_stat));
+ error("Cannot allocate %zu bytes of memory", (size_t)sizeof(struct pid_stat));
return NULL;
}
all_pids[pid]->fds = calloc(sizeof(int), 100);
if(!all_pids[pid]->fds)
- error("Cannot allocate %ld bytes of memory", (unsigned long)(sizeof(int) * 100));
+ error("Cannot allocate %zu bytes of memory", (size_t)(sizeof(int) * 100));
else all_pids[pid]->fds_size = 100;
if(root_of_pids) root_of_pids->prev = all_pids[pid];