Date: | Sat, 13 Sep 2008 19:07:57 +0100 |
From: | Jochen Voss <voss@seehuhn.de> |
To: | krb5-bugs@mit.edu |
Subject: | dead code in lib/rpc/clnt_udp.c |
Hello,
while looking through the source of the Debian package
krb5-1.6.dfsg.4~beta1, I came across the following function
(file src/lib/rpc/clnt_udp.c, lines 221-407):
static enum clnt_stat
clntudp_call([...])
{
[...]
else {
[...]
enum xdr_op op = reply_xdrs.x_op;
reply_xdrs.x_op = XDR_FREE;
xdr_replymsg(&reply_xdrs, &reply_msg);
reply_xdrs.x_op = op;
return (RPC_CANTDECODERES);
cu->cu_error.re_status = RPC_CANTDECODERES;
}
return (cu->cu_error.re_status);
}
Since the "return (RPC_CANTDECODERES);" is unconditional, the
following assignment to cu->cu_error.re_status can never be reached.
I am not quite sure about the intention of the code, but my guess is,
that this assignment should just be removed.
I hope this helps,
Jochen
--
http://seehuhn.de/
while looking through the source of the Debian package
krb5-1.6.dfsg.4~beta1, I came across the following function
(file src/lib/rpc/clnt_udp.c, lines 221-407):
static enum clnt_stat
clntudp_call([...])
{
[...]
else {
[...]
enum xdr_op op = reply_xdrs.x_op;
reply_xdrs.x_op = XDR_FREE;
xdr_replymsg(&reply_xdrs, &reply_msg);
reply_xdrs.x_op = op;
return (RPC_CANTDECODERES);
cu->cu_error.re_status = RPC_CANTDECODERES;
}
return (cu->cu_error.re_status);
}
Since the "return (RPC_CANTDECODERES);" is unconditional, the
following assignment to cu->cu_error.re_status can never be reached.
I am not quite sure about the intention of the code, but my guess is,
that this assignment should just be removed.
I hope this helps,
Jochen
--
http://seehuhn.de/
Message body not shown because it is not plain text.