diff options
author | 1996-09-15 08:52:41 +0000 | |
---|---|---|
committer | 1996-09-15 08:52:41 +0000 | |
commit | 6608aef3ee51398581f8ffb5ec834cc3e35f649c (patch) | |
tree | 09e8961f833a4d23382616e781c7955795065536 | |
parent | Fix prototype (diff) | |
download | wireguard-openbsd-6608aef3ee51398581f8ffb5ec834cc3e35f649c.tar.xz wireguard-openbsd-6608aef3ee51398581f8ffb5ec834cc3e35f649c.zip |
Don't add a comma after the last entry in an enum
-rw-r--r-- | usr.bin/rpcgen/rpc_hout.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/rpcgen/rpc_hout.c b/usr.bin/rpcgen/rpc_hout.c index 7750796f736..1e6b8647606 100644 --- a/usr.bin/rpcgen/rpc_hout.c +++ b/usr.bin/rpcgen/rpc_hout.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rpc_hout.c,v 1.2 1996/06/26 05:38:36 deraadt Exp $ */ +/* $OpenBSD: rpc_hout.c,v 1.3 1996/09/15 08:52:41 tholo Exp $ */ /* $NetBSD: rpc_hout.c,v 1.4 1995/06/11 21:49:55 pk Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for @@ -383,7 +383,10 @@ penumdef(def) f_print(fout, " = %s + %d", last, count++); } } - f_print(fout, ",\n"); + if (l->next) + f_print(fout, ",\n"); + else + f_print(fout, "\n"); } f_print(fout, "};\n"); f_print(fout, "typedef enum %s %s;\n", name, name); |