From owner-svn-src-head@freebsd.org Sat Mar 18 16:09:31 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 BFD2AD126F5; Sat, 18 Mar 2017 16:09:31 +0000 (UTC) (envelope-from jilles@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 743FF192C; Sat, 18 Mar 2017 16:09:31 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2IG9Up9011799; Sat, 18 Mar 2017 16:09:30 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2IG9UPt011798; Sat, 18 Mar 2017 16:09:30 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201703181609.v2IG9UPt011798@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sat, 18 Mar 2017 16:09:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315487 - head/bin/sh 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: Sat, 18 Mar 2017 16:09:31 -0000 Author: jilles Date: Sat Mar 18 16:09:30 2017 New Revision: 315487 URL: https://svnweb.freebsd.org/changeset/base/315487 Log: sh: Remove unused return value of subevalvar_misc(). Modified: head/bin/sh/expand.c Modified: head/bin/sh/expand.c ============================================================================== --- head/bin/sh/expand.c Sat Mar 18 16:07:28 2017 (r315486) +++ head/bin/sh/expand.c Sat Mar 18 16:09:30 2017 (r315487) @@ -97,7 +97,7 @@ static const char *expari(const char *, struct worddest *); static void expbackq(union node *, int, int, struct worddest *); static void subevalvar_trim(const char *, struct nodelist *, int, int, int); -static int subevalvar_misc(const char *, struct nodelist *, const char *, int, +static void subevalvar_misc(const char *, struct nodelist *, const char *, int, int, int); static const char *evalvar(const char *, struct nodelist **restrict, int, struct worddest *); @@ -617,7 +617,7 @@ subevalvar_trim(const char *p, struct no } -static int +static void subevalvar_misc(const char *p, struct nodelist *argbackq, const char *var, int subtype, int startloc, int varflags) { @@ -634,7 +634,7 @@ subevalvar_misc(const char *p, struct no setvar(var, startp, 0); amount = startp - expdest; STADJUST(amount, expdest); - return 1; + return; case VSQUESTION: if (*p != CTLENDVAR) { @@ -643,7 +643,6 @@ subevalvar_misc(const char *p, struct no } error("%.*s: parameter %snot set", (int)(p - var - 1), var, (varflags & VSNUL) ? "null or " : ""); - return 0; default: abort(); @@ -792,12 +791,11 @@ again: /* jump here after setting a vari case VSASSIGN: case VSQUESTION: if (!set) { - if (subevalvar_misc(p, *argbackq, var, subtype, - startloc, varflags)) { - varflags &= ~VSNUL; - goto again; - } - break; + subevalvar_misc(p, *argbackq, var, subtype, + startloc, varflags); + /* assert(subtype == VSASSIGN); */ + varflags &= ~VSNUL; + goto again; } break;