Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Aug 2018 00:00:13 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r337664 - head/sbin/bectl
Message-ID:  <201808120000.w7C00Dpq052032@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Sun Aug 12 00:00:13 2018
New Revision: 337664
URL: https://svnweb.freebsd.org/changeset/base/337664

Log:
  bectl(8): Rename "index" variable, which shadows a global in some lands

Modified:
  head/sbin/bectl/bectl.c

Modified: head/sbin/bectl/bectl.c
==============================================================================
--- head/sbin/bectl/bectl.c	Sat Aug 11 23:50:09 2018	(r337663)
+++ head/sbin/bectl/bectl.c	Sun Aug 12 00:00:13 2018	(r337664)
@@ -116,14 +116,14 @@ static struct command_map_entry command_map[] =
 };
 
 static int
-get_cmd_index(const char *cmd, int *index)
+get_cmd_index(const char *cmd, int *idx)
 {
 	int map_size;
 
 	map_size = nitems(command_map);
 	for (int i = 0; i < map_size; ++i) {
 		if (strcmp(cmd, command_map[i].command) == 0) {
-			*index = i;
+			*idx = i;
 			return (0);
 		}
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808120000.w7C00Dpq052032>