Some remarks on kdebase revision 595286

Alexander Neundorf neundorf at kde.org
Sat Oct 14 00:38:45 BST 2006


On Saturday 14 October 2006 01:09, Christoph Bartoschek wrote:
> runtime/kioslave/nfs/nfs_prot_xdr.c:102,277,787,557,766,871,500,392,479,458
>, -
> 730,536,712,682,667,652,637,428,413,751,443,87,521,76,74,700,380,50,368,62
> -
> runtime/kioslave/nfs/mount_xdr.c:196,194,62,176,119,149,107,164,95,50,83,13
>7
>
> buf is used to initialize itself?

These files are generated:

/*
 * Please do not edit this file.
 * It was generated using rpcgen.
 */

#include <rpc/types.h>
#include <rpc/xdr.h>
#include <arpa/inet.h>

#include "nfs_prot.h"
/*
 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
 * unrestricted use provided that this legend is included on all tape
...

It seems in most cases buf is unused, so maybe this is put there to avoid 
compiler warnings.
In the cases where it is used, it's alwas used this way:

bool_t
xdr_writeargs(XDR *xdrs, writeargs *objp)
{

	 register int32_t *buf=buf;
...
	 buf = XDR_INLINE(xdrs,3 * BYTES_PER_XDR_UNIT);
	   if (buf == NULL) {


So it always is initialized to some useful value.

Alex
-- 
Work: alexander.neundorf AT jenoptik.com - http://www.jenoptik-los.de
Home: neundorf AT kde.org                - http://www.kde.org
      alex AT neundorf.net               - http://www.neundorf.net




More information about the kde-core-devel mailing list