[gimp] fix some precedence errors
- From: Simon Budig <simon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] fix some precedence errors
- Date: Fri, 15 Aug 2014 23:00:52 +0000 (UTC)
commit 99abc566d462d7fe3c1de8c39c297770b67c0360
Author: Simon Budig <simon budig de>
Date: Fri Aug 15 23:02:31 2014 +0200
fix some precedence errors
Spotted by Andrey Karpov using static code analysis:
http://www.viva64.com/en/b/0273/
app/core/gimp-memsize.c | 4 ++--
plug-ins/common/lcms.c | 4 ++--
plug-ins/script-fu/script-fu-scripts.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/app/core/gimp-memsize.c b/app/core/gimp-memsize.c
index b88a9ac..9e9d9f5 100644
--- a/app/core/gimp-memsize.c
+++ b/app/core/gimp-memsize.c
@@ -193,8 +193,8 @@ gimp_g_value_get_memsize (GValue *value)
GimpArray *array = g_value_get_boxed (value);
if (array)
- memsize += (sizeof (GimpArray) +
- array->static_data ? 0 : array->length);
+ memsize += sizeof (GimpArray) +
+ (array->static_data ? 0 : array->length);
}
else if (GIMP_VALUE_HOLDS_STRING_ARRAY (value))
{
diff --git a/plug-ins/common/lcms.c b/plug-ins/common/lcms.c
index ab9961a..95f7346 100644
--- a/plug-ins/common/lcms.c
+++ b/plug-ins/common/lcms.c
@@ -1014,7 +1014,7 @@ lcms_layers_transform_rgb (gint *layers,
dest_profile, lcms_format,
intent,
cmsFLAGS_NOOPTIMIZE |
- bpc ? cmsFLAGS_BLACKPOINTCOMPENSATION : 0);
+ (bpc ? cmsFLAGS_BLACKPOINTCOMPENSATION : 0));
if (transform)
{
@@ -1095,7 +1095,7 @@ lcms_image_transform_indexed (gint32 image,
dest_profile, format,
intent,
cmsFLAGS_NOOPTIMIZE |
- bpc ? cmsFLAGS_BLACKPOINTCOMPENSATION : 0);
+ (bpc ? cmsFLAGS_BLACKPOINTCOMPENSATION : 0));
if (transform)
{
diff --git a/plug-ins/script-fu/script-fu-scripts.c b/plug-ins/script-fu/script-fu-scripts.c
index 521a4c2..28f639a 100644
--- a/plug-ins/script-fu/script-fu-scripts.c
+++ b/plug-ins/script-fu/script-fu-scripts.c
@@ -895,7 +895,7 @@ script_fu_menu_map (const gchar *menu_path)
{
const gchar *suffix = menu_path + strlen (mapping[i].old);
- if (! *suffix == '/')
+ if (*suffix != '/')
continue;
return g_strconcat (mapping[i].new, suffix, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]