summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorvapier@chromium.org <vapier@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-20 18:14:40 +0000
committervapier@chromium.org <vapier@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-20 18:14:40 +0000
commitbecdaa3de361d84f94b24b623d2cb975efa7ce47 (patch)
treebc98f3d7cbb68f2853c9e631b772b210c3cbc141 /base
parentc66d7053396a8c440e46a1c7a2baf591b71e9fda (diff)
downloadchromium_src-becdaa3de361d84f94b24b623d2cb975efa7ce47.zip
chromium_src-becdaa3de361d84f94b24b623d2cb975efa7ce47.tar.gz
chromium_src-becdaa3de361d84f94b24b623d2cb975efa7ce47.tar.bz2
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
Diffstat (limited to 'base')
-rw-r--r--base/eintr_wrapper.h6
1 files 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