From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933664AbcBCUpf (ORCPT ); Wed, 3 Feb 2016 15:45:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47720 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933618AbcBCUpd (ORCPT ); Wed, 3 Feb 2016 15:45:33 -0500 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <1454145497-4567-1-git-send-email-juerg.haefliger@hpe.com> References: <1454145497-4567-1-git-send-email-juerg.haefliger@hpe.com> To: Juerg Haefliger Cc: dhowells@redhat.com, linux-kernel@vger.kernel.org, keyrings@vger.kernel.org, dwmw2@infradead.org Subject: Re: [PATCH] scripts/sign-file.c: Add support for signing with a raw signature MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <14230.1454532331.1@warthog.procyon.org.uk> Date: Wed, 03 Feb 2016 20:45:31 +0000 Message-ID: <14231.1454532331@warthog.procyon.org.uk> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In the patched file, I see: if (!raw_sig) { ... } if (!raw_sig && save_sig) { ... } if (!raw_sig && sign_only) { ... } Can you just merge the three into one if-statement that is conditional on !raw_sig with conditional bits inside? It might be worth moving the contents out to its own function, but it deals with sufficient of main's context that it might not actually be worthwhile. David