Skip to content

Commit c3850f4

Browse files
author
Luigi Rizzo
committed
bugfix: less verbose error messages and correct cast for sysctl_proc
1 parent 75b0b05 commit c3850f4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

extra/missing.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ callout_run(void)
379379
continue;
380380
}
381381
if (delta > 100)
382-
D("running %p due at %d now %d", cur, cur->c_time, ticks);
382+
RD(1,"running %p due at %d now %d", cur, cur->c_time, ticks);
383383
TAILQ_REMOVE(&callout_head, cur, c_links.tqe);
384384
cur->c_flags &= ~CALLOUT_ACTIVE;
385385
cur->c_func(cur->c_arg);
@@ -546,7 +546,7 @@ kesysctl_emu_get(struct sockopt* sopt)
546546
req.oldptr = &tmp;
547547
f = GST.entry[i].fn;
548548
ND("-- %s is a proc -- at %p", GST.entry[i].name, f);
549-
ret = f(NULL, NULL, (int)(GST.entry[i].data), &req);
549+
ret = f(NULL, NULL, (int)(intptr_t)(GST.entry[i].data), &req);
550550
ND("-- %s returns %d", GST.entry[i].name, ret);
551551
bcopy(&tmp, pdata, sizeof(tmp));
552552
} else {
@@ -602,7 +602,7 @@ kesysctl_emu_set(void* p, int l)
602602
req.newptr = pdata;
603603
f = GST.entry[i].fn;
604604
ND("-- %s is a proc -- at %p", GST.entry[i].name, f);
605-
ret = f(NULL, NULL, (int)(GST.entry[i].data), &req);
605+
ret = f(NULL, NULL, (int)(intptr_t)(GST.entry[i].data), &req);
606606
ND("-- %s returns %d", GST.entry[i].name, ret);
607607
} else {
608608
bcopy(pdata, GST.entry[i].data, GST.entry[i].head.datalen);

0 commit comments

Comments
 (0)