rxgen: use unsigned type for max array length
authorBenjamin Kaduk <kaduk@mit.edu>
Fri, 25 Apr 2014 19:23:16 +0000 (15:23 -0400)
committerD Brashear <shadow@your-file-system.com>
Fri, 23 May 2014 19:31:14 +0000 (15:31 -0400)
Plain '0' is of type int, i.e., signed, and therefore so is '~0'.
The length of an XDR array is unsigned, so this constant should
be of an unsigned type.

Change-Id: I13f5f94b2f54bc0adcdf2ded1696b797b5205057
Reviewed-on: http://gerrit.openafs.org/11107
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>

src/rxgen/rpc_parse.c

index 9c3d133..3deb417 100644 (file)
@@ -473,7 +473,7 @@ get_declaration(declaration * dec, defkind dkind)
        }
        dec->rel = REL_ARRAY;
        if (peekscan(TOK_RANGLE, &tok)) {
-           dec->array_max = "~0";      /* unspecified size, use max */
+           dec->array_max = "~0u";     /* unspecified size, use max */
        } else {
            scan_num(&tok);
            dec->array_max = tok.str;