summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2003-12-06 13:24:22 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2003-12-06 13:24:22 +0000
commit886d7dc02b0d14074df048196829573a66d91819 (patch)
tree3fabedd15d58f34776b8b7af084fda73b2e127ad /src
parentfeea20ae3470a19170d225e04ed019a5fc405874 (diff)
merge XFree86 4.3.99.901 (RC1) from vendor branchXORG-RELEASE-1-BASEXEVIE-MERGEXEVIE-BASEXINERAMA_2XEVIE
Diffstat (limited to 'src')
-rw-r--r--src/authutil.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/src/authutil.c b/src/authutil.c
index abdbf44..3ac9bb5 100644
--- a/src/authutil.c
+++ b/src/authutil.c
@@ -1,4 +1,5 @@
/* $Xorg: authutil.c,v 1.5 2001/02/09 02:03:26 xorgcvs Exp $ */
+/* $XdotOrg$ */
/******************************************************************************
@@ -26,7 +27,7 @@ in this Software without prior written authorization from The Open Group.
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 @@ char **stringp;
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;