summaryrefslogtreecommitdiffstats
path: root/usr.bin/rpcgen/rpc_sample.c
diff options
context:
space:
mode:
authoreadler <eadler@FreeBSD.org>2015-04-19 04:53:28 +0000
committereadler <eadler@FreeBSD.org>2015-04-19 04:53:28 +0000
commit1cd30e69b52da2f4dce89b7e0739071bde785141 (patch)
tree2290b4dc12367be655d31552d8b4743e02f28ea7 /usr.bin/rpcgen/rpc_sample.c
parenta06fddc3fca7664ac5672d01e3a8759b4f54cba6 (diff)
downloadFreeBSD-src-1cd30e69b52da2f4dce89b7e0739071bde785141.zip
FreeBSD-src-1cd30e69b52da2f4dce89b7e0739071bde785141.tar.gz
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.
Diffstat (limited to 'usr.bin/rpcgen/rpc_sample.c')
-rw-r--r--usr.bin/rpcgen/rpc_sample.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/rpcgen/rpc_sample.c b/usr.bin/rpcgen/rpc_sample.c
index 6a2bef8..5d6c9a9 100644
--- a/usr.bin/rpcgen/rpc_sample.c
+++ b/usr.bin/rpcgen/rpc_sample.c
@@ -115,7 +115,7 @@ write_sample_client(const char *program_name, version_list *vp)
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);
OpenPOWER on IntegriCloud