diff src/input-method-xlib.c @ 3462:6c7605dfcf07

[xemacs-hg @ 2006-06-19 18:19:33 by james] Fix various problems found by static checkers: use of uninitialized values, dereferencing pointers before checking whether they are NULL, memory leaks, and incomplete checking of return values. <m3k67gpyhk.fsf@jerrypc.cs.usu.edu>
author james
date Mon, 19 Jun 2006 18:19:38 +0000
parents 3d8143fc88e1
children 5333f383efbd
line wrap: on
line diff
--- a/src/input-method-xlib.c	Mon Jun 19 18:10:19 2006 +0000
+++ b/src/input-method-xlib.c	Mon Jun 19 18:19:38 2006 +0000
@@ -384,13 +384,18 @@
 void
 XIM_SetGeometry (struct frame *f)
 {
-  XIC      xic   = FRAME_X_XIC (f);
-  XIMStyle style = FRAME_X_XIC_STYLE (f);
+  XIC      xic;
+  XIMStyle style;
   XRectangle area;
 
-  if (!xic || !f)
+  if (!f)
     return;
 
+  xic = FRAME_X_XIC (f);
+  if (!xic)
+    return;
+
+  style = FRAME_X_XIC_STYLE (f);
   if (style & XIMStatusArea)
     {
       /* Place Status Area in bottom right corner */