From owner-svn-src-all@freebsd.org Thu Dec 7 23:19:10 2017 Return-Path: Delivered-To: svn-src-all@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 68399E93E57 for ; Thu, 7 Dec 2017 23:19:10 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22a.google.com (mail-it0-x22a.google.com [IPv6:2607:f8b0:4001:c0b::22a]) (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 2818F7B36A for ; Thu, 7 Dec 2017 23:19:10 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22a.google.com with SMTP id p139so1045128itb.1 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=pkKLozIHuvIV/IigaeqFIdXJwW+0lJY4DQgrebDfL4Sb/0NIZDywIz6vCxEPVjf0lo uk2anmq1RKW0aAKQCn7Z9lk5IkFaz0lWGioIvKTcTY0TLTWVTic8xvDt/Ra42sWCEACd 4iFNxFot/i+3U1lkAS1biNBeC4NGcs1HaB983Xe1/SKTawrUD+d/Us96GmEuxK9KTrsG yQsqejgfYPjECvwrhuAo/QRIDPs4DuGHEirM/JfEfWU6MG1U5mTKsyb+yhY2xo+kC63b lc6E6ktd7NIzU0tsiHZfEm63GcWRH5w9bAzlWah6hBgt2DeinJvcCcQoWJE+2HhlOU/8 lOQw== X-Gm-Message-State: AKGB3mK43odZS/cBzrt6UigbcMGi9Y/2zb+tiInIHoAK/GXHKusiv/m3 ZKxv//3TilCfNPskWGsJZeINrm6pzGueSI43c22UNQ== 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-all@freebsd.org X-Mailman-Version: 2.1.25 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: 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