From: Chaskiel Grundman Date: Fri, 20 Sep 2013 18:28:07 +0000 (-0400) Subject: rxgen: Always pass aliases (typedefs) as pointers X-Git-Tag: upstream/1.8.0_pre1^2~425 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=b7bfd3aa2715e49b2b1ec056b60d8dda72317ebc;p=packages%2Fo%2Fopenafs.git rxgen: Always pass aliases (typedefs) as pointers Since prototypes were introduced, xdr functions for typedef foo expect a foo *, never a foo, even if the underlying type is an array. print_param (for stubs) got this right, but print_stat (for inter-xdr calls) did not. Change-Id: I2b12aaf919fd39e6195d85072fdfd915a1c509f0 Reviewed-on: http://gerrit.openafs.org/10259 Reviewed-by: Daria Brashear Reviewed-by: Benjamin Kaduk Tested-by: BuildBot --- diff --git a/src/rxgen/rpc_util.c b/src/rxgen/rpc_util.c index 203fda2db..f70c4abb4 100644 --- a/src/rxgen/rpc_util.c +++ b/src/rxgen/rpc_util.c @@ -59,7 +59,6 @@ list *defined; /* list of defined things */ /* static prototypes */ static int findit(definition * def, char *type); static char *fixit(char *type, char *orig); -static int typedefed(definition * def, char *type); static char *locase(char *str); static char *toktostr(tok_kind kind); static void printbuf(void); @@ -189,21 +188,9 @@ ptype(char *prefix, char *type, int follow) } -static int -typedefed(definition * def, char *type) -{ - if (def->def_kind != DEF_TYPEDEF || def->def.ty.old_prefix != NULL) { - return (0); - } else { - return (streq(def->def_name, type)); - } -} - int isvectordef(char *type, relation rel) { - definition *def; - for (;;) { switch (rel) { case REL_VECTOR: @@ -213,12 +200,7 @@ isvectordef(char *type, relation rel) case REL_POINTER: return (0); case REL_ALIAS: - def = (definition *) FINDVAL(defined, type, typedefed); - if (def == NULL) { - return (0); - } - type = def->def.ty.old_type; - rel = def->def.ty.rel; + return (0); } } }