From becdaa3de361d84f94b24b623d2cb975efa7ce47 Mon Sep 17 00:00:00 2001 From: "vapier@chromium.org" Date: Tue, 20 Mar 2012 18:14:40 +0000 Subject: HANDLE_EINTR: parenthesize arguments Make sure the expanded arg is in a paren to guard against possible side effects. BUG=chromium:115686 TEST=None Review URL: http://codereview.chromium.org/9460022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127721 0039d316-1c4b-4281-b951-d872f2087c98 --- base/eintr_wrapper.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/base/eintr_wrapper.h b/base/eintr_wrapper.h index 191c2a7..3d52760 100644 --- a/base/eintr_wrapper.h +++ b/base/eintr_wrapper.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -20,14 +20,14 @@ #define HANDLE_EINTR(x) ({ \ typeof(x) __eintr_result__; \ do { \ - __eintr_result__ = x; \ + __eintr_result__ = (x); \ } while (__eintr_result__ == -1 && errno == EINTR); \ __eintr_result__;\ }) #else -#define HANDLE_EINTR(x) x +#define HANDLE_EINTR(x) (x) #endif // OS_POSIX -- cgit v1.1