From 39f5e5198f666c1a00b9df957a17b2c3fe11a9ae Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 21 Mar 2011 11:12:38 -0700 Subject: [PATCH] * frame.c (validate_x_resource_name): Simplify count usage. This also avoids a warning with gcc -Wstrict-overflow. --- src/ChangeLog | 2 ++ src/frame.c | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index d833648667d..34104669a53 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,8 @@ * frame.c (Fmodify_frame_parameters): Simplify loop counter. This also avoids a warning with gcc -Wstrict-overflow. + (validate_x_resource_name): Simplify count usage. + This also avoids a warning with gcc -Wstrict-overflow. * fileio.c (Fcopy_file): Report error if fchown or fchmod fail (Bug#8306). diff --git a/src/frame.c b/src/frame.c index 60f192e9817..3e00e1bf107 100644 --- a/src/frame.c +++ b/src/frame.c @@ -3713,8 +3713,7 @@ validate_x_resource_name (void) return; /* If name is entirely invalid, or nearly so, use `emacs'. */ - if (good_count == 0 - || (good_count == 1 && bad_count > 0)) + if (good_count < 2) { Vx_resource_name = build_string ("emacs"); return; -- 2.39.2