From owner-svn-src-head@freebsd.org Thu Dec 7 23:19:10 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 7241CE93E59 for ; Thu, 7 Dec 2017 23:19:10 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22d.google.com (mail-it0-x22d.google.com [IPv6:2607:f8b0:4001:c0b::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 340C07B36B for ; Thu, 7 Dec 2017 23:19:10 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22d.google.com with SMTP id x28so1061881ita.0 for ; Thu, 07 Dec 2017 15:19:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=CB4RcnvRWZJ/agHxxrG+J/b/yqNasT296z6IE7KqmPo=; b=A1/Mv4hX85dQL1pWpdOiB82pkaYPAj+fBGqN9QubxxvFHDRd9zfO1OMjXBZ3wBCnNO hnn22+44OtHWxM1x2g8l5HoEqR7ugja0yBDA4JzABVehmCqxyAGlNr7TSAl1GeR/mp3L FGpEMoar1s0Q9QL3GUtVts5QLeMjfBqDovtC2JcYv5xQHskCQPEQEueWcGlQcvtGy8OX QgsFywlf7tIPD5+rOVJegngtb6f1YoB28/BClZ9/479Tc2OM6sBcla5l318BcZqObwyQ 4qrG1iG8NUbad9zlcsZ3F6RKlqWw3kfAUG2VuTFJ44m++4g4CPUXv5T2SNsjHk1ZA7r9 69Qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=CB4RcnvRWZJ/agHxxrG+J/b/yqNasT296z6IE7KqmPo=; b=MReigXSWIzTnWjAJqB5nd3NMIEmus3u0GMdTzyc6US5UNNaNMWcEAR6pI1wCKlMNjx xTZxScX4huW3GcqwyzwA2HlT0UAhiQf3Kx8qaK0QxaGGc4Jn53H9nlIp51fCpFDlZy4j bG8hpB7zEK0c1BwfVGhtVdWcoRGsu8VonMr9lSTTaLK2pjIIH9BsPm57xO7Kg4vF3prT v1GlXDXD6EL7WSjgsSORUGN1WPD7v59r2jCldi01xwFBZiZmbXr+Eu4r0WYLvmLw0P5c WkEyyLA2P7pKOxpHKu+aywpQXUx7ctiiasxjWDYk/zs7u/l7+o2dfs4LmXS4TQFC6vUB ywiA== X-Gm-Message-State: AKGB3mIVM//Xd/8nAlDwp/XQaQad33asdivIq+yPalJk2TdWkPe97zrP 078vAuoEcOGvM+Sh2cbqCvybImxGwD17b/ELbWqbHg== X-Google-Smtp-Source: AGs4zMYfS1eClEmFRco10qj4SFlVCkAcYv+psMil8wfwgOSkNYwJkpDbjapvWIqoCFHryITzWtsq+UdfU2lvi4/EoXc= X-Received: by 10.36.147.193 with SMTP id y184mr3281143itd.64.1512688749184; Thu, 07 Dec 2017 15:19:09 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Thu, 7 Dec 2017 15:19:08 -0800 (PST) X-Originating-IP: [50.253.109.65] In-Reply-To: <20171208093703.Q1048@besplex.bde.org> References: <201712071516.vB7FGHuT069830@repo.freebsd.org> <20171208093703.Q1048@besplex.bde.org> From: Warner Losh Date: Thu, 7 Dec 2017 16:19:08 -0700 X-Google-Sender-Auth: Jl0qzCcAlLWDGJylfjzb_yzVSyY Message-ID: Subject: Re: svn commit: r326658 - head/lib/libefivar To: Bruce Evans Cc: Mark Johnston , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 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: Thu, 07 Dec 2017 23:19:10 -0000 On Thu, Dec 7, 2017 at 3:50 PM, Bruce Evans wrote: > On Thu, 7 Dec 2017, Mark Johnston wrote: > > Log: >> Ensure that "out" is initialized in all error paths. >> ... >> Modified: head/lib/libefivar/efivar-dp-xlate.c >> ============================================================ >> ================== >> --- head/lib/libefivar/efivar-dp-xlate.c Thu Dec 7 09:05:34 >> 2017 (r326657) >> +++ head/lib/libefivar/efivar-dp-xlate.c Thu Dec 7 15:16:17 >> 2017 (r326658) >> @@ -529,7 +529,7 @@ build_dp(const char *efimedia, const char *relpath, ef >> { >> char *fp, *dptxt = NULL; >> int rv = 0; >> - efidp out; >> + efidp out = NULL; >> size_t len; >> >> fp = path_to_file_dp(relpath); >> > > This is a worse style of initializations in declararations than usual. > 1 initialization in a non-declaration is mixed with many initializations > in declarations, using the C99 misfeature of allowing initialiations > after statements, without even any blank lines to keep the declarations > separate. > This matches the current style of the file though... > Most libefivar code is much uglier than this, with 2-space indentation > and worse. The code you are complaining about is vendor code.... The 2-space indentation is the least of the issues with that code.... Warner