From: Paul Eggert Date: Mon, 21 Mar 2011 18:12:38 +0000 (-0700) Subject: * frame.c (validate_x_resource_name): Simplify count usage. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~513^2~10 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=39f5e5198f666c1a00b9df957a17b2c3fe11a9ae;p=emacs.git * frame.c (validate_x_resource_name): Simplify count usage. This also avoids a warning with gcc -Wstrict-overflow. --- 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;