Date: Sun, 19 Apr 2015 04:53:29 +0000 (UTC) From: Eitan Adler <eadler@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281724 - head/usr.bin/rpcgen Message-ID: <201504190453.t3J4rTQT057322@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: eadler Date: Sun Apr 19 04:53:28 2015 New Revision: 281724 URL: https://svnweb.freebsd.org/changeset/base/281724 Log: rpcgen: fix use use of strcmp strcmp only guarantee that it will return at least 1 if the string B is greater than that of string A. Modified: head/usr.bin/rpcgen/rpc_sample.c Modified: head/usr.bin/rpcgen/rpc_sample.c ============================================================================== --- head/usr.bin/rpcgen/rpc_sample.c Sun Apr 19 04:27:50 2015 (r281723) +++ head/usr.bin/rpcgen/rpc_sample.c Sun Apr 19 04:53:28 2015 (r281724) @@ -115,7 +115,7 @@ write_sample_client(const char *program_ for (l = proc->args.decls; l != NULL; l = l->next) { f_print(fout, "\t"); ptype(l->decl.prefix, l->decl.type, 1); - if (strcmp(l->decl.type,"string") == 1) + if (strcmp(l->decl.type,"string") >= 1) f_print(fout, " "); pvname(proc->proc_name, vp->vers_num); f_print(fout, "_%s;\n", l->decl.name);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504190453.t3J4rTQT057322>