summaryrefslogtreecommitdiff
path: root/dix/extension.c
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2006-09-08 15:25:17 -0400
committerEamon Walsh <ewalsh@moss-uranus.epoch.ncsc.mil>2006-09-08 15:25:17 -0400
commit9deb579dc9366590203afe0576bf88643ab36c89 (patch)
treed694b6728bb69a66e2437ec9a904581e048b5884 /dix/extension.c
parentcec392656cda1c938d5462e1949e6eef489f9168 (diff)
Zero out newly created ExtensionEntry structures, but only after the
devPrivates have been initialized.
Diffstat (limited to 'dix/extension.c')
-rw-r--r--dix/extension.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/dix/extension.c b/dix/extension.c
index ee00ab9dc..f58c73138 100644
--- a/dix/extension.c
+++ b/dix/extension.c
@@ -80,7 +80,7 @@ extern int extensionPrivateLen;
extern unsigned *extensionPrivateSizes;
extern unsigned totalExtensionSize;
-static int
+static void
InitExtensionPrivates(ExtensionEntry *ext)
{
register char *ptr;
@@ -107,7 +107,6 @@ InitExtensionPrivates(ExtensionEntry *ext)
else
ppriv->ptr = (pointer)NULL;
}
- return 1;
}
_X_EXPORT ExtensionEntry *
@@ -127,9 +126,10 @@ AddExtension(char *name, int NumEvents, int NumErrors,
return((ExtensionEntry *) NULL);
ext = (ExtensionEntry *) xalloc(totalExtensionSize);
- if (!ext || !InitExtensionPrivates(ext))
+ if (!ext)
return((ExtensionEntry *) NULL);
bzero(ext, totalExtensionSize);
+ InitExtensionPrivates(ext);
ext->name = (char *)xalloc(strlen(name) + 1);
ext->num_aliases = 0;
ext->aliases = (char **)NULL;