From patchwork Thu May 18 08:39:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 9732927 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 49959601BC for ; Thu, 18 May 2017 08:42:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 34A302872E for ; Thu, 18 May 2017 08:42:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2922E287B7; Thu, 18 May 2017 08:42:01 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 90C182872E for ; Thu, 18 May 2017 08:42:00 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dBGyL-0004Hs-0M; Thu, 18 May 2017 08:39:49 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dBGyK-0004Hm-M0 for xen-devel@lists.xenproject.org; Thu, 18 May 2017 08:39:48 +0000 Received: from [193.109.254.147] by server-6.bemta-6.messagelabs.com id 49/80-03920-3DD5D195; Thu, 18 May 2017 08:39:47 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrLIsWRWlGSWpSXmKPExsXS6fjDS/dyrGy kwf9pYhbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8a/LY9ZC85LVOxZ+5ClgXGpSBcjJ4eQQJ5E R/MGNhCbV8BOYl3rN2YQW0LAUOL0wpssIDaLgKrEotfnweJsAuoSbc+2s3YxcnCICBhInDua1 MXIxcEscJVJomnxSnaQGmEBJ4nWXbeYIeYXSZw9cYMRxOYUsJf4feYnWC+vgKDE3x3CIGFmoL V/vx9hn8DIMwshMwtJBsLWknj46xYLhK0tsWzha2aQcmYBaYnl/zggwtYS654cYkJVAmK7STz vOs2ygJFjFaN6cWpRWWqRroleUlFmekZJbmJmjq6hgZlebmpxcWJ6ak5iUrFecn7uJkZgsDIA wQ7G7sv+hxglOZiURHld/8lECvEl5adUZiQWZ8QXleakFh9ilOHgUJLgnRojGykkWJSanlqRl pkDjBuYtAQHj5IIbz5Imre4IDG3ODMdInWKUVFKnNcRJCEAksgozYNrg8XqJUZZKWFeRqBDhH gKUotyM0tQ5V8xinMwKgnz6gIjX4gnM68EbvoroMVMQIubH0iDLC5JREhJNTCK5HpevhxzXOB yUkpTGv/jUgtGz4aPS9u++ttoVKhcVK4V7YjKOLyle7LrmfTquFKr05nvvpgzT3zox1j/503o czUOy6rHn/qYZ1+pntDBW1T8wGNLx/XCzJnqQeaeEr4VFwO+HFY6Pv/547XyMuu5dx/duiZ6T iODs97mzbNXvjsiM4PVO0KJpTgj0VCLuag4EQA4ReO70AIAAA== X-Env-Sender: JBeulich@suse.com X-Msg-Ref: server-10.tower-27.messagelabs.com!1495096785!79768527!1 X-Originating-IP: [137.65.248.74] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.12; banners=-,-,- X-VirusChecked: Checked Received: (qmail 34583 invoked from network); 18 May 2017 08:39:47 -0000 Received: from prv-mh.provo.novell.com (HELO prv-mh.provo.novell.com) (137.65.248.74) by server-10.tower-27.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 18 May 2017 08:39:47 -0000 Received: from INET-PRV-MTA by prv-mh.provo.novell.com with Novell_GroupWise; Thu, 18 May 2017 02:39:45 -0600 Message-Id: <591D79F1020000780015ABFD@prv-mh.provo.novell.com> X-Mailer: Novell GroupWise Internet Agent 14.2.2 Date: Thu, 18 May 2017 02:39:45 -0600 From: "Jan Beulich" To: "xen-devel" References: <591D7113020000780015ABB8@prv-mh.provo.novell.com> <591D7113020000780015ABB8@prv-mh.provo.novell.com> In-Reply-To: <591D7113020000780015ABB8@prv-mh.provo.novell.com> Mime-Version: 1.0 Cc: Stefano Stabellini , Wei Liu , George Dunlap , Andrew Cooper , Ian Jackson , Tim Deegan , Julien Grall Subject: [Xen-devel] [PATCH 1/3] xmalloc: correct _xmalloc_array() indentation X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP It's been wrongly indented using tabs till now, and the stray blank ahead of the final return statement gets in the way of using .i files for detailed analysis of other compiler issues (-Wmisleading-indentation kickin in due to the tab->space transformation done in the course of pre-processing). Also add missing spaces inside the if() at once, including the similar case in _xzalloc_array(). Signed-off-by: Jan Beulich xmalloc: correct _xmalloc_array() indentation It's been wrongly indented using tabs till now, and the stray blank ahead of the final return statement gets in the way of using .i files for detailed analysis of other compiler issues (-Wmisleading-indentation kickin in due to the tab->space transformation done in the course of pre-processing). Also add missing spaces inside the if() at once, including the similar case in _xzalloc_array(). Signed-off-by: Jan Beulich --- a/xen/include/xen/xmalloc.h +++ b/xen/include/xen/xmalloc.h @@ -33,17 +33,17 @@ extern void *_xzalloc(unsigned long size static inline void *_xmalloc_array( unsigned long size, unsigned long align, unsigned long num) { - /* Check for overflow. */ - if (size && num > UINT_MAX / size) - return NULL; - return _xmalloc(size * num, align); + /* Check for overflow. */ + if ( size && num > UINT_MAX / size ) + return NULL; + return _xmalloc(size * num, align); } static inline void *_xzalloc_array( unsigned long size, unsigned long align, unsigned long num) { /* Check for overflow. */ - if (size && num > UINT_MAX / size) + if ( size && num > UINT_MAX / size ) return NULL; return _xzalloc(size * num, align); } Reviewed-by: Wei Liu Reviewed-by: Andrew Cooper --- a/xen/include/xen/xmalloc.h +++ b/xen/include/xen/xmalloc.h @@ -33,17 +33,17 @@ extern void *_xzalloc(unsigned long size static inline void *_xmalloc_array( unsigned long size, unsigned long align, unsigned long num) { - /* Check for overflow. */ - if (size && num > UINT_MAX / size) - return NULL; - return _xmalloc(size * num, align); + /* Check for overflow. */ + if ( size && num > UINT_MAX / size ) + return NULL; + return _xmalloc(size * num, align); } static inline void *_xzalloc_array( unsigned long size, unsigned long align, unsigned long num) { /* Check for overflow. */ - if (size && num > UINT_MAX / size) + if ( size && num > UINT_MAX / size ) return NULL; return _xzalloc(size * num, align); }