Commit 4371f7bd authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Various code-polishings to make OmnitiOS happy.

Some of them are rather pedantic:  "NULL" vs "(char*)0" -- Really ?
parent 060e6449
......@@ -476,7 +476,7 @@ mgt_sigchld(const struct vev *e, int what)
assert(r == child_pid);
vsb = VSB_new_auto();
XXXAN(vsb);
VSB_printf(vsb, "Child (%d) %s", r, status ? "died" : "ended");
VSB_printf(vsb, "Child (%ld) %s", (long)r, status ? "died" : "ended");
if (WIFEXITED(status) && WEXITSTATUS(status)) {
VSB_printf(vsb, " status=%d", WEXITSTATUS(status));
exit_status |= 0x20;
......
......@@ -177,7 +177,7 @@ static void
run_cc(void *priv)
{
mgt_sandbox(SANDBOX_CC);
(void)execl("/bin/sh", "/bin/sh", "-c", priv, NULL);
(void)execl("/bin/sh", "/bin/sh", "-c", priv, (char*)0);
}
/*--------------------------------------------------------------------
......
......@@ -320,7 +320,7 @@ smp_open(const struct stevedore *st)
/* We trust the parent to give us a valid silo, for good measure: */
AZ(smp_valid_silo(sc));
AZ(mprotect(sc->base, 4096, PROT_READ));
AZ(mprotect((void*)sc->base, 4096, PROT_READ));
sc->ident = SIGN_DATA(&sc->idn);
......
......@@ -178,7 +178,7 @@ smp_mgt_init(struct stevedore *parent, int ac, char * const *av)
else
target = NULL;
sc->base = mmap(target, sc->mediasize, PROT_READ|PROT_WRITE,
sc->base = (void*)mmap(target, sc->mediasize, PROT_READ|PROT_WRITE,
MAP_NOCORE | MAP_NOSYNC | MAP_SHARED, sc->fd, 0);
if (sc->base == MAP_FAILED)
......
......@@ -377,10 +377,10 @@ varnish_launch(struct varnish *v)
AZ(close(v->fds[3]));
for (i = 3; i <getdtablesize(); i++)
(void)close(i);
AZ(execl("/bin/sh", "/bin/sh", "-c", VSB_data(vsb), NULL));
AZ(execl("/bin/sh", "/bin/sh", "-c", VSB_data(vsb), (char*)0));
exit(1);
} else {
vtc_log(v->vl, 3, "PID: %d", v->pid);
vtc_log(v->vl, 3, "PID: %ld", (long)v->pid);
}
AZ(close(v->fds[0]));
AZ(close(v->fds[3]));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment