Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 May 2017 08:02:21 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r318725 - stable/11/usr.bin/resizewin
Message-ID:  <201705230802.v4N82Ljl094983@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Tue May 23 08:02:21 2017
New Revision: 318725
URL: https://svnweb.freebsd.org/changeset/base/318725

Log:
  MFC r317905:
  
  Rename a variable, hopefully fixing build after r317901.

Modified:
  stable/11/usr.bin/resizewin/resizewin.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.bin/resizewin/resizewin.c
==============================================================================
--- stable/11/usr.bin/resizewin/resizewin.c	Tue May 23 08:01:24 2017	(r318724)
+++ stable/11/usr.bin/resizewin/resizewin.c	Tue May 23 08:02:21 2017	(r318725)
@@ -52,11 +52,11 @@ main(__unused int argc, __unused char **
 {
 	struct termios old, new;
 	struct winsize w;
-	int ret, fd, cnt, err;
+	int ret, fd, cnt, error;
 	char data[20];
 	struct timeval then, now;
 
-	err = 0;
+	error = 0;
 
 	if ((fd = open("/dev/tty", O_RDWR | O_NONBLOCK)) == -1)
 		exit(1);
@@ -72,7 +72,7 @@ main(__unused int argc, __unused char **
 		exit(1);
 
 	if (write(fd, query, sizeof(query)) != sizeof(query)) {
-		err = 1;
+		error = 1;
 		goto out;
 	}
 
@@ -89,14 +89,14 @@ main(__unused int argc, __unused char **
 				timersub(&now, &then, &now);
 				if (now.tv_sec >= 2) {
 					warnx("timeout reading from terminal");
-					err = 1;
+					error = 1;
 					goto out;
 				}
 
 				usleep(20000);
 				continue;
 			}
-			err = 1;
+			error = 1;
 			goto out;
 		}
 		if (data[cnt] == 'R')
@@ -105,25 +105,25 @@ main(__unused int argc, __unused char **
 		cnt++;
 		if (cnt == sizeof(data) - 2) {
 			warnx("response too long");
-			err = 1;
+			error = 1;
 			goto out;
 		}
 	}
 
 	/* Parse */
 	if (sscanf(data, "\033[%hu;%huR", &w.ws_row, &w.ws_col) != 2) {
-		err = 1;
+		error = 1;
 		warnx("unable to parse response");
 		goto out;
 	}
 
 	/* Finally, what we want */
 	if (ioctl(fd, TIOCSWINSZ, &w) == -1)
-		err = 1;
+		error = 1;
  out:
 	/* Restore echo */
 	tcsetattr(fd, TCSANOW, &old);
 
 	close(fd);
-	exit(err);
+	exit(error);
 }



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