From: Chaskiel Grundman Date: Fri, 20 Sep 2013 19:08:30 +0000 (-0400) Subject: rxgen: cast bool properly X-Git-Tag: upstream/1.8.0_pre1^2~997 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=d14ecfc39a88ee5ff802532d69db30e8ae396f68;p=packages%2Fo%2Fopenafs.git rxgen: cast bool properly The C type for xdr's bool is bool_t. When casting, use the correct type Change-Id: I562ee1e48eeffa8fece66176cf13013630d157aa Reviewed-on: http://gerrit.openafs.org/10261 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- diff --git a/src/rxgen/rpc_cout.c b/src/rxgen/rpc_cout.c index 0ea37744b..4868a0f15 100644 --- a/src/rxgen/rpc_cout.c +++ b/src/rxgen/rpc_cout.c @@ -161,7 +161,11 @@ print_ifarg(char *arg) static void print_ifarg_with_cast(int ptr_to, char *type, char *arg) { - f_print(fout, ptr_to ? ", (%s *) %s" : ", (%s) %s", type, arg); + if (streq(type, "bool")) { + f_print(fout, ptr_to ? ", (bool_t *) %s" : ", (bool_t) %s", arg); + } else { + f_print(fout, ptr_to ? ", (%s *) %s" : ", (%s) %s", type, arg); + } } static void