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);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to