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.
This commit is contained in:
Eitan Adler 2015-04-19 04:53:28 +00:00
parent e4c6d6e268
commit ba6663d9a1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=281724

View file

@ -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);