From owner-svn-src-head@freebsd.org Sun May 7 12:08:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 569D8D62E08; Sun, 7 May 2017 12:08:43 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB139D08; Sun, 7 May 2017 12:08:42 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47C8fWG020446; Sun, 7 May 2017 12:08:41 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47C8f8n020445; Sun, 7 May 2017 12:08:41 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705071208.v47C8f8n020445@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 7 May 2017 12:08:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317905 - head/usr.bin/resizewin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 12:08:43 -0000 Author: trasz Date: Sun May 7 12:08:41 2017 New Revision: 317905 URL: https://svnweb.freebsd.org/changeset/base/317905 Log: Rename a variable, hopefully fixing build after r317901. MFC after: 2 weeks Sponsored by: DARPA, AFRL Modified: head/usr.bin/resizewin/resizewin.c Modified: head/usr.bin/resizewin/resizewin.c ============================================================================== --- head/usr.bin/resizewin/resizewin.c Sun May 7 11:44:25 2017 (r317904) +++ head/usr.bin/resizewin/resizewin.c Sun May 7 12:08:41 2017 (r317905) @@ -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); }