clean up some code
authorroot <root>
Mon, 17 Sep 2007 08:31:54 +0000 (08:31 +0000)
committerroot <root>
Mon, 17 Sep 2007 08:31:54 +0000 (08:31 +0000)
src/command.C
src/screen.C

index bdc13f157bcf339ae16778237f640a443578770b..22fb4c41ab82c62553bfdb15dbdf0be6393a30e5 100644 (file)
@@ -1731,13 +1731,10 @@ rxvt_term::focus_in ()
 #if ENABLE_FRILLS
       if (option (Opt_urgentOnBell))
         {
-          XWMHints *h;
-
-          h = XGetWMHints(dpy, parent[0]);
-          if (h != NULL)
+          if (XWMHints *h = XGetWMHints(dpy, parent[0]))
             {
               h->flags &= ~XUrgencyHint;
-              XSetWMHints(dpy, parent[0], h);
+              XSetWMHints (dpy, parent[0], h);
             }
         }
 #endif
index 7e5831b66774842b0cf1d4e7ed220d2739b65246..24a1d9eea3acf956e1b5d2f60afd44a4d115d29f 100644 (file)
@@ -1887,16 +1887,14 @@ rxvt_term::scr_bell () NOTHROW
 #  endif
     XMapWindow (dpy, parent[0]);
 # endif
+
 # if ENABLE_FRILLS
   if (option (Opt_urgentOnBell))
     {
-      XWMHints *h;
-
-      h = XGetWMHints(dpy, parent[0]);
-      if (h != NULL)
+      if (XWMHints *h = XGetWMHints(dpy, parent[0]))
         {
           h->flags |= XUrgencyHint;
-          XSetWMHints(dpy, parent[0], h);
+          XSetWMHints (dpy, parent[0], h);
         }
     }
 # endif