Skip Menu |

Date: Sat, 13 Sep 2008 19:07:57 +0100
From: Jochen Voss <>
Subject: dead code in lib/rpc/clnt_udp.c

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
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;
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,
Download signature.asc
application/pgp-signature 197B

Message body not shown because it is not plain text.

Subject: SVN Commit

In clntudp_call, fix a bug in the handling of an error case (it failed
to set the error status field and generated a dead code warning).

Commit By: ghudson

Revision: 20809
Changed Files:
U trunk/src/lib/rpc/clnt_udp.c