[Xorg-commit] xc/lib/ICE authutil.c,1.1.4.1,1.1.4.2

Kaleb Keithley xserver-commit at pdx.freedesktop.org
Sat Dec 6 15:24:54 EET 2003


Committed by: kaleb

Update of /cvs/xorg/xc/lib/ICE
In directory pdx:/home/kaleb/xorg/xc.XORG-CURRENT/lib/ICE

Modified Files:
      Tag: XORG-CURRENT
	authutil.c 
Log Message:
merge XFree86 4.3.99.901 (RC1) from vendor branch

Index: authutil.c
===================================================================
RCS file: /cvs/xorg/xc/lib/ICE/authutil.c,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- authutil.c	17 Nov 2003 19:03:40 -0000	1.1.4.1
+++ authutil.c	6 Dec 2003 13:24:22 -0000	1.1.4.2
@@ -1,4 +1,5 @@
 /* $Xorg: authutil.c,v 1.5 2001/02/09 02:03:26 xorgcvs Exp $ */
+/* $XdotOrg$ */
 /******************************************************************************
 
 
@@ -26,7 +27,7 @@
 
 Author: Ralph Mor, X Consortium
 ******************************************************************************/
-/* $XFree86: xc/lib/ICE/authutil.c,v 3.9 2002/05/31 18:45:41 dawes Exp $ */
+/* $XFree86: xc/lib/ICE/authutil.c,v 3.10 2003/11/26 21:48:18 herrb Exp $ */
 
 #include <X11/ICE/ICElib.h>
 #include "ICElibint.h"
@@ -418,25 +419,21 @@
     if (!read_short (file, &len))
 	return (0);
 
-    if (len == 0)
-    {
-	data = 0;
-    }
-    else
-    {
-    	data = malloc ((unsigned) len + 1);
-
-    	if (!data)
+    data = malloc ((unsigned) len + 1);
+    
+    if (!data)
 	    return (0);
-
-    	if (fread (data, (int) sizeof (char), (int) len, file) != len)
+    
+    if (len != 0) 
+    {
+	if (fread (data, (int) sizeof (char), (int) len, file) != len)
 	{
 	    free (data);
 	    return (0);
-    	}
-
-	data[len] = '\0';
+	}
+	
     }
+    data[len] = '\0';
 
     *stringp = data;
 





More information about the xorg-commit mailing list