From patchwork Mon May 13 15:55:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Sidwell X-Patchwork-Id: 1098967 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-500571-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=acm.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="NXZkwato"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="mETdaLPl"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 452llq2WZwz9sBb for ; Tue, 14 May 2019 01:55:46 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=JIcaagBYO7wI9LG6/N8FRcdjHwCQxjijLSyOJDcVosvW2WVpaz Yrp47xN+IPncGnr9jizhtXwPYY8c+r3VNeDbOcgmiLT2CDcuHdI5vK3LYcXnQnMt 5r0aORImyqSU41vp+vCv1ue5s3Gt+V3iO6VuiBvq9l8AhTSqPVkePe1aE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=yJQJd0jhJhCfpKz4jkfECRM8Vc4=; b=NXZkwato3g66075M5hmB hFg1jXFr7MHRwYewlvCtIIq+QObJNnCeBNPdeVlFpdb04wvrancIkF+rOzkhDajY XDTE0w3HPuy1awgsl15Cq8HXhPl3aISC4Zclbtkk36+6PEAOG/Dc2mTyq6xwYvhY yGmgE1LN4Tdg2TviwbDJlIA= Received: (qmail 68529 invoked by alias); 13 May 2019 15:55:40 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 68518 invoked by uid 89); 13 May 2019 15:55:40 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00, FREEMAIL_FROM, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=termination, HX-Google-DKIM-Signature:sender, H*r:500, gccc X-HELO: mail-pg1-f177.google.com Received: from mail-pg1-f177.google.com (HELO mail-pg1-f177.google.com) (209.85.215.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 13 May 2019 15:55:38 +0000 Received: by mail-pg1-f177.google.com with SMTP id h17so7004640pgv.0 for ; Mon, 13 May 2019 08:55:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:to:from:subject:message-id:date:user-agent:mime-version :content-language; bh=wwLpSuu42NqiiaUrFo+iDpdN8hXbZ2SFTBmsAtX9M/o=; b=mETdaLPlGlpZ/csHTBQHjT9HTu43f03COiq59rMR3hozjzg3t/YsGEinu4v08eEhQ6 SmAQ6teZxXZKvc5SJewcntaF5oVL1n7kcffpfw/qmrcqjmHjura6FKC23MxHtV7nnIoD eTyNfMtFd5gUzB3OhpMO2ZDSk4ZQxH7r1GHH/N+SwgaqY+tUJIvWcpy4RxV//oRBZWuM Ek0sPANwJQHBmqVQTVSlAKy4MV3eFNC/hcmCXEHOeY8U4UA2RSD7sGki4Ruq2ChOtQPg RbFrMyrCNsnS1XkRNlk9M5fbVr41fizVvQIMk26TsuOYvJD+mJA5SUH8Lr0y8uVvqumD +/2A== Received: from ?IPv6:2620:10d:c0a3:1407:5029:f01e:d972:8b81? ([2620:10d:c091:500::3:58d3]) by smtp.googlemail.com with ESMTPSA id a6sm21566947pgd.67.2019.05.13.08.55.34 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Mon, 13 May 2019 08:55:35 -0700 (PDT) To: GCC Patches From: Nathan Sidwell Subject: [PATCH] A couple of driver cleanups Message-ID: Date: Mon, 13 May 2019 11:55:33 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 I'm applying this obvious patch. Two hunks deal with inappropriate line breaks, and the first changes the baroque: var = (thing) ? thing : var; into the much clearer if (thing) var = thing; nathan 2019-05-13 Nathan Sidwell gcc.c * (execute): Simplify cond-expr into if. Reformat command. (run_attempt): Reformat line break. Index: gcc.c =================================================================== --- gcc.c (revision 271130) +++ gcc.c (working copy) @@ -3068,7 +3068,8 @@ execute (void) if (!wrapper_string) { string = find_a_file (&exec_prefixes, commands[0].prog, X_OK, false); - commands[0].argv[0] = (string) ? string : commands[0].argv[0]; + if (string) + commands[0].argv[0] = string; } for (n_commands = 1, i = 0; argbuf.iterate (i, &arg); i++) @@ -3077,8 +3078,7 @@ execute (void) #if defined (__MSDOS__) || defined (OS2) || defined (VMS) fatal_error (input_location, "%<-pipe%> not supported"); #endif - argbuf[i] = 0; /* Termination of - command args. */ + argbuf[i] = 0; /* Termination of command args. */ commands[n_commands].prog = argbuf[i + 1]; commands[n_commands].argv = &(argbuf.address ())[i + 1]; @@ -6926,8 +6926,8 @@ run_attempt (const char **new_argv, cons fatal_error (input_location, "pex_init failed: %m"); errmsg = pex_run (pex, pex_flags, new_argv[0], - CONST_CAST2 (char *const *, const char **, &new_argv[1]), out_temp, - err_temp, &err); + CONST_CAST2 (char *const *, const char **, &new_argv[1]), + out_temp, err_temp, &err); if (errmsg != NULL) { errno = err;