From owner-svn-src-all@freebsd.org Tue Feb 4 21:16:17 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6AABE234D77; Tue, 4 Feb 2020 21:16:17 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48ByDK223wz4ZfB; Tue, 4 Feb 2020 21:16:17 +0000 (UTC) (envelope-from markj@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 26AE920001; Tue, 4 Feb 2020 21:16:17 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 014LGHVm019032; Tue, 4 Feb 2020 21:16:17 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 014LGGqV019030; Tue, 4 Feb 2020 21:16:16 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202002042116.014LGGqV019030@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 4 Feb 2020 21:16:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357536 - head/contrib/elftoolchain/libelftc X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/contrib/elftoolchain/libelftc X-SVN-Commit-Revision: 357536 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Feb 2020 21:16:17 -0000 Author: markj Date: Tue Feb 4 21:16:16 2020 New Revision: 357536 URL: https://svnweb.freebsd.org/changeset/base/357536 Log: libelftc: Add a missing check for an error from vector_str_init(). While here consistently use the same spelling for such checks. CID: 1376769 MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/libelftc/libelftc_dem_arm.c head/contrib/elftoolchain/libelftc/libelftc_dem_gnu2.c head/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c Modified: head/contrib/elftoolchain/libelftc/libelftc_dem_arm.c ============================================================================== --- head/contrib/elftoolchain/libelftc/libelftc_dem_arm.c Tue Feb 4 21:15:52 2020 (r357535) +++ head/contrib/elftoolchain/libelftc/libelftc_dem_arm.c Tue Feb 4 21:16:16 2020 (r357536) @@ -303,12 +303,11 @@ init_demangle_data(struct demangle_data *d) d->type = ENCODE_FUNC; - if (vector_str_init(&d->vec) == false) + if (!vector_str_init(&d->vec)) return (false); - if (vector_str_init(&d->arg) == false) { + if (!vector_str_init(&d->arg)) { vector_str_dest(&d->vec); - return (false); } Modified: head/contrib/elftoolchain/libelftc/libelftc_dem_gnu2.c ============================================================================== --- head/contrib/elftoolchain/libelftc/libelftc_dem_gnu2.c Tue Feb 4 21:15:52 2020 (r357535) +++ head/contrib/elftoolchain/libelftc/libelftc_dem_gnu2.c Tue Feb 4 21:16:16 2020 (r357536) @@ -389,12 +389,11 @@ init_demangle_data(struct demangle_data *d) d->type = ENCODE_FUNC; - if (vector_str_init(&d->vec) == false) + if (!vector_str_init(&d->vec)) return (false); - if (vector_str_init(&d->arg) == false) { + if (!vector_str_init(&d->arg)) { vector_str_dest(&d->vec); - return (false); } Modified: head/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c ============================================================================== --- head/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c Tue Feb 4 21:15:52 2020 (r357535) +++ head/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c Tue Feb 4 21:16:16 2020 (r357536) @@ -1659,7 +1659,8 @@ cpp_demangle_read_local_name(struct cpp_demangle_data if (*(++ddata->cur) == '\0') return (0); - vector_str_init(&local_name); + if (!vector_str_init(&local_name)) + return (0); ddata->cur_output = &local_name; if (!cpp_demangle_read_encoding(ddata)) { @@ -3953,7 +3954,7 @@ vector_type_qualifier_init(struct vector_type_qualifie assert(v->q_container != NULL); - if (vector_str_init(&v->ext_name) == false) { + if (!vector_str_init(&v->ext_name)) { free(v->q_container); return (0); }