* frame.c (validate_x_resource_name): Simplify count usage.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 21 Mar 2011 18:12:38 +0000 (11:12 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 21 Mar 2011 18:12:38 +0000 (11:12 -0700)
This also avoids a warning with gcc -Wstrict-overflow.

src/ChangeLog
src/frame.c

index d833648..3410466 100644 (file)
@@ -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).
index 60f192e..3e00e1b 100644 (file)
@@ -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;