From: David van Moolenbroek Date: Mon, 31 Oct 2011 16:03:26 +0000 (+0000) Subject: Kernel: fix for senda erroneously setting errors X-Git-Tag: v3.2.0~282 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=1992529666840d84d72e92ececb82ab7f1cf550a;p=minix.git Kernel: fix for senda erroneously setting errors Bug reported and fixed by Arne Welzel. --- diff --git a/kernel/proc.c b/kernel/proc.c index b8cf5cf99..95291e0cd 100644 --- a/kernel/proc.c +++ b/kernel/proc.c @@ -1079,7 +1079,7 @@ field, caller->p_name, entry, priv(caller)->s_asynsize, priv(caller)->s_asyntab) *===========================================================================*/ PRIVATE int mini_senda(struct proc *caller_ptr, asynmsg_t *table, size_t size) { - int r = OK, dst_p, done, do_notify; + int r, dst_p, done, do_notify; unsigned int i; unsigned flags; endpoint_t dst; @@ -1129,6 +1129,7 @@ PRIVATE int mini_senda(struct proc *caller_ptr, asynmsg_t *table, size_t size) if (!(flags & AMF_VALID)) return(EINVAL); /* Must contain message */ if (flags & AMF_DONE) continue; /* Already done processing */ + r = OK; if (!isokendpt(tabent.dst, &dst_p)) r = EDEADSRCDST; /* Bad destination, report the error */ else if (iskerneln(dst_p))