aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/registry.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/dix/registry.c')
-rwxr-xr-x[-rw-r--r--]xorg-server/dix/registry.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/xorg-server/dix/registry.c b/xorg-server/dix/registry.c
index 82a3340e1..ce741c28e 100644..100755
--- a/xorg-server/dix/registry.c
+++ b/xorg-server/dix/registry.c
@@ -25,6 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include <X11/X.h>
#include <X11/Xproto.h>
#include "resource.h"
@@ -207,7 +208,7 @@ RegisterResourceName(RESTYPE resource, const char *name)
resource &= TypeMask;
while (resource >= nresource) {
- if (!double_size(&resources, nresource, sizeof(char *)))
+ if (!double_size((void*)&resources, nresource, sizeof(char *)))
return;
nresource = nresource ? nresource * 2 : BASE_SIZE;
}
@@ -300,7 +301,7 @@ dixFreeRegistry(void)
free(errors[nerror]);
free(errors);
- free(resources);
+ free((void*)resources);
requests = NULL;
nminor = NULL;
@@ -322,7 +323,7 @@ dixFreeRegistry(void)
void
dixResetRegistry(void)
{
- ExtensionEntry extEntry = { .name = CORE };
+ ExtensionEntry extEntry;
dixFreeRegistry();
@@ -345,6 +346,8 @@ dixResetRegistry(void)
RegisterResourceName(RT_PASSIVEGRAB, "PASSIVE GRAB");
/* Add the core protocol */
+ memset(&extEntry, 0, sizeof(extEntry));
+ extEntry.name = CORE;
RegisterExtensionNames(&extEntry);
}