From patchwork Fri Feb 17 00:23:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luc Van Oostenryck X-Patchwork-Id: 9578557 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4E561600C5 for ; Fri, 17 Feb 2017 00:25:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 32D652869B for ; Fri, 17 Feb 2017 00:25:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 27638286A0; Fri, 17 Feb 2017 00:25:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BDF822869B for ; Fri, 17 Feb 2017 00:25:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753186AbdBQAZl (ORCPT ); Thu, 16 Feb 2017 19:25:41 -0500 Received: from mail-wr0-f194.google.com ([209.85.128.194]:34890 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752902AbdBQAZk (ORCPT ); Thu, 16 Feb 2017 19:25:40 -0500 Received: by mail-wr0-f194.google.com with SMTP id q39so3745226wrb.2 for ; Thu, 16 Feb 2017 16:25:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=qUp06TgoweqDJM1XciPoFhYlXxjMIhqQh5zEK+e9grw=; b=pn+oLA5xRLeu2n5FQt/Wa3mRIRnizIUHDRV4JlPCOxyCqxrQLFx/OoKQHnkC/mI/5a PwHIeQtf0FgPH5haPWWHxNSaAEW35q4ccIzEBfC+FEQvFVFn78Yexi9+ne61yGQJQ4Jh omWbyrNwjqrgUGrloZYp4Gu7tUlFYfaacYGbdtVZLMEHe18X50usfw/9276TIZ49NvzC 7foZA7U1lI+cgWZGAMzrJFfFNdafk7o8nfZ8FSpCo0M8zZeWMLdkJQB3Yaonq+6BGp5X nZqcLjPFz1y+j7HdsOwm2Z2YdIgSO9r0mEpL/SjBKKW6mDFh3hWW+A8bI2m1pzLhhi2g P63g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=qUp06TgoweqDJM1XciPoFhYlXxjMIhqQh5zEK+e9grw=; b=sizb+7VTy/TKefMvsqTWgTxT1J/KmWMSMMeDu4XNDr3UxXg3k8KZ6o8oBWVVK6dM/b YJF/y74IuUGEt5if6ke1hu2r0hVQBaIJXEaEmmeWmayePiWrird68kJmVeeBcGGG4Cik Fh8yFmSkSL3NDfjKJQkFbN83uouELoqs6vVspKqjzXYW2meazcXERahUrgVmsIBXiUQC bZiSTfBIWzzk9ly45eyU16FFbPXK9EA/zcea/ZQj/vYP/v8lzloOPQIwaPRZsCBnTYUy h8dPSZyRanHHoJ0ocizphiR+pFw6RYAuD18vMd6oNLbLDRg+GouceLbDzMZ5gwcSWGgJ Qwog== X-Gm-Message-State: AMke39ls/2fvWQ+0cXuFYu3/gQDTcbwLaHrEHNZ5liTyZVFi6s6jH7F9MFCljapz6MmrDg== X-Received: by 10.223.152.171 with SMTP id w40mr4661890wrb.72.1487291139371; Thu, 16 Feb 2017 16:25:39 -0800 (PST) Received: from localhost.localdomain ([109.128.197.43]) by smtp.gmail.com with ESMTPSA id 36sm4210702wrk.57.2017.02.16.16.25.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Feb 2017 16:25:38 -0800 (PST) From: Luc Van Oostenryck To: linux-sparse@vger.kernel.org Cc: Christopher Li , Luc Van Oostenryck , Oleg Nesterov Subject: [PATCH] add missing braces around FOR_EACH_PTR loop Date: Fri, 17 Feb 2017 01:23:32 +0100 Message-Id: <20170217002332.12245-1-luc.vanoostenryck@gmail.com> X-Mailer: git-send-email 2.11.0 Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Stricto sensu, these braces are not needed but are used everywhere else around FOR_EACH_PTR and friends loops. Their lack can also bite you when doing experiments with the ptrlist macros ... CC: Oleg Nesterov Signed-off-by: Luc Van Oostenryck --- dissect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dissect.c b/dissect.c index 67428ec64..5f067eb4c 100644 --- a/dissect.c +++ b/dissect.c @@ -541,7 +541,7 @@ static struct symbol *do_initializer(struct symbol *type, struct expression *exp break; case EXPR_INITIALIZER: m_addr = 0; - FOR_EACH_PTR(expr->expr_list, m_expr) + FOR_EACH_PTR(expr->expr_list, m_expr) { if (type->type == SYM_ARRAY) { m_type = base_type(type); if (m_expr->type == EXPR_INDEX) @@ -567,7 +567,7 @@ static struct symbol *do_initializer(struct symbol *type, struct expression *exp } do_initializer(m_type, m_expr); m_addr++; - END_FOR_EACH_PTR(m_expr); + } END_FOR_EACH_PTR(m_expr); } return type;