/*
+ * $Id: atp_rresp.c,v 1.6 2009-10-13 22:55:37 didg Exp $
+ *
* Copyright (c) 1990,1991 Regents of The University of Michigan.
* All Rights Reserved.
*
#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
#include <stdlib.h>
#include <string.h>
#ifdef EBUG
#include <stdio.h>
-#endif
+#endif /* EBUG */
#include "atp_internals.h"
int
-atp_rresp( ah, atpb )
- ATP ah; /* open atp handle */
- struct atp_block *atpb; /* parameter block */
+atp_rresp(
+ ATP ah, /* open atp handle */
+ struct atp_block *atpb) /* parameter block */
{
- int len, i, rc;
+ int i, rc;
+ size_t len;
#ifdef EBUG
atp_print_bufuse( ah, "atp_rresp" );
-#endif
+#endif /* EBUG */
/* check parameters
*/
if ( atpb->atp_rresiovcnt <= 0 || atpb->atp_rresiovcnt > 8 ) {
return( -1 );
}
#ifdef EBUG
- fprintf( stderr, "atp_rresp copying %d bytes packet %d\n",
+ fprintf( stderr, "atp_rresp copying %ld bytes packet %d\n",
len, i );
bprint( (char *)ah->atph_resppkt[ i ]->atpbuf_info.atpbuf_data,
len + ATP_HDRSIZE );
-#endif
+#endif /* EBUG */
memcpy(atpb->atp_rresiov[ i ].iov_base,
ah->atph_resppkt[ i ]->atpbuf_info.atpbuf_data + ATP_HDRSIZE,
len );