summaryrefslogtreecommitdiffstats
path: root/usr.bin/rpcgen
diff options
context:
space:
mode:
authormatthieu <matthieu@openbsd.org>2004-07-16 07:31:05 +0000
committermatthieu <matthieu@openbsd.org>2004-07-16 07:31:05 +0000
commit2efcaeeea562347a6d53bf0945219b0fb6e20415 (patch)
treea4c44bda5c5a7770939a148e203517e802be9aa9 /usr.bin/rpcgen
parentsync (diff)
downloadwireguard-openbsd-2efcaeeea562347a6d53bf0945219b0fb6e20415.tar.xz
wireguard-openbsd-2efcaeeea562347a6d53bf0945219b0fb6e20415.zip
Avoid generating an unused variable. From NetBSD. ok deraadt@
Diffstat (limited to 'usr.bin/rpcgen')
-rw-r--r--usr.bin/rpcgen/rpc_cout.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/rpcgen/rpc_cout.c b/usr.bin/rpcgen/rpc_cout.c
index 993afa69fdc..fb717b93ff7 100644
--- a/usr.bin/rpcgen/rpc_cout.c
+++ b/usr.bin/rpcgen/rpc_cout.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rpc_cout.c,v 1.17 2004/05/09 22:22:45 deraadt Exp $ */
+/* $OpenBSD: rpc_cout.c,v 1.18 2004/07/16 07:31:05 matthieu Exp $ */
/* $NetBSD: rpc_cout.c,v 1.6 1996/10/01 04:13:53 cgd Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -165,8 +165,6 @@ print_header(def)
if (doinline == 0)
return;
- /* May cause lint to complain. but ... */
- fprintf(fout, "\tint32_t *buf;\n");
}
static void
@@ -458,15 +456,19 @@ emit_struct(def)
can_inline = 1;
if (can_inline == 0) { /* can not inline, drop back to old mode */
+ fprintf(fout, "\n");
for (dl = def->def.st.decls; dl != NULL; dl = dl->next)
print_stat(1, &dl->decl);
return;
}
+ /* May cause lint to complain. but ... */
+ fprintf(fout, "\tint32_t *buf;\n");
+
flag = PUT;
for (j = 0; j < 2; j++) {
if (flag == PUT)
- fprintf(fout, "\tif (xdrs->x_op == XDR_ENCODE) {\n");
+ fprintf(fout, "\n\tif (xdrs->x_op == XDR_ENCODE) {\n");
else
fprintf(fout, "\t\treturn (TRUE);\n\t} else if (xdrs->x_op == XDR_DECODE) {\n");