Skip to contentSkip to conversation

SUNRPC: RPC program information is stored in unsigned integers

PATCH In review Chuck Lever 1 participant 1 message Oct 26, 2007

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 26/27 SUNRPC: RPC program information is stored in unsigned integers

Clean up: When looping over RPC version and procedure numbers, use unsigned index variables.

---

 net/sunrpc/stats.c |    4 ++--
 net/sunrpc/svc.c   |    5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)
net/sunrpc/stats.c +2 -2
index 4d4f373..9d1f182 100644
@@ -33,7 +33,7 @@ struct proc_dir_entry	*proc_net_rpc = NULL;
 static int rpc_proc_show(struct seq_file *seq, void *v) {
 	const struct rpc_stat	*statp = seq->private;
 	const struct rpc_program *prog = statp->program;
-	int		i, j;
+	unsigned int i, j;
 
 	seq_printf(seq,
 		"net %u %u %u %u\n",
@@ -81,7 +81,7 @@ void svc_seq_show(struct seq_file *seq, const struct svc_stat *statp) {
 	const struct svc_program *prog = statp->program;
 	const struct svc_procedure *proc;
 	const struct svc_version *vers;
-	int		i, j;
+	unsigned int i, j;
 
 	seq_printf(seq,
 		"net %u %u %u %u\n",
net/sunrpc/svc.c +3 -2
index 4695ad7..c14630f 100644
@@ -363,7 +363,7 @@ __svc_create(struct svc_program *prog, unsigned int bufsize, int npools,
 	   void (*shutdown)(struct svc_serv *serv))
 {
 	struct svc_serv	*serv;
-	int vers;
+	unsigned int vers;
 	unsigned int xdrsize;
 	unsigned int i;
 
@@ -736,7 +736,8 @@ svc_register(struct svc_serv *serv, int proto, unsigned short port)
 {
 	struct svc_program	*progp;
 	unsigned long		flags;
-	int			i, error = 0, dummy;
+	unsigned int		i;
+	int			error = 0, dummy;
 
 	if (!port)
 		clear_thread_flag(TIF_SIGPENDING);

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs