Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/rpcgen Use proper (enough) parentheses in macro expa...



details:   https://anonhg.NetBSD.org/src/rev/8be25616ded8
branches:  trunk
changeset: 808234:8be25616ded8
user:      dholland <dholland%NetBSD.org@localhost>
date:      Sat May 09 23:19:34 2015 +0000

description:
Use proper (enough) parentheses in macro expansion.

diffstat:

 usr.bin/rpcgen/rpc_util.h |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (20 lines):

diff -r a705168ab958 -r 8be25616ded8 usr.bin/rpcgen/rpc_util.h
--- a/usr.bin/rpcgen/rpc_util.h Sat May 09 23:16:51 2015 +0000
+++ b/usr.bin/rpcgen/rpc_util.h Sat May 09 23:19:34 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rpc_util.h,v 1.9 2015/05/09 21:44:47 christos Exp $    */
+/*     $NetBSD: rpc_util.h,v 1.10 2015/05/09 23:19:34 dholland Exp $   */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
@@ -35,8 +35,8 @@
  * rpc_util.h, Useful definitions for the RPC protocol compiler 
  */
 
-#define alloc(size)            (void *)malloc((unsigned)(size))
-#define ALLOC(object)   (object *) malloc(sizeof(object))
+#define alloc(size)            ((char *)malloc((size_t)(size)))
+#define ALLOC(object)          ((object *)malloc(sizeof(object)))
 
 #define s_print        (void) sprintf
 #define f_print (void) fprintf



Home | Main Index | Thread Index | Old Index