summaryrefslogtreecommitdiff
path: root/xkb/xkbLEDs.c
diff options
context:
space:
mode:
authorMikhail Gusarov <dottedmag@dottedmag.net>2010-05-06 01:44:06 +0700
committerMikhail Gusarov <dottedmag@dottedmag.net>2010-05-13 00:22:37 +0700
commit3f3ff971ecff9936cebafc813af9193b97bba89c (patch)
treefdbbad794a42488b7ffe41eed7aba4e498335f55 /xkb/xkbLEDs.c
parent96c7ab27c383ec767f62a7a11e5fd76f86363fbc (diff)
Replace X-allocation functions with their C89 counterparts
The only remaining X-functions used in server are XNF*, the rest is converted to plain alloc/calloc/realloc/free/strdup. X* functions are still exported from server and x* macros are still defined in header file, so both ABI and API are not affected by this change. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'xkb/xkbLEDs.c')
-rw-r--r--xkb/xkbLEDs.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/xkb/xkbLEDs.c b/xkb/xkbLEDs.c
index 8c28513ec..6097f8576 100644
--- a/xkb/xkbLEDs.c
+++ b/xkb/xkbLEDs.c
@@ -524,7 +524,7 @@ Bool checkNames;
sli= NULL;
checkAccel= checkNames= FALSE;
if ((kf!=NULL)&&(kf->xkb_sli==NULL)) {
- kf->xkb_sli= sli= xcalloc(1, sizeof(XkbSrvLedInfoRec));
+ kf->xkb_sli= sli= calloc(1, sizeof(XkbSrvLedInfoRec));
if (sli==NULL)
return NULL; /* ALLOCATION ERROR */
if (dev->key && dev->key->xkbInfo)
@@ -567,7 +567,7 @@ Bool checkNames;
}
}
else if ((lf!=NULL)&&(lf->xkb_sli==NULL)) {
- lf->xkb_sli= sli= xcalloc(1, sizeof(XkbSrvLedInfoRec));
+ lf->xkb_sli= sli= calloc(1, sizeof(XkbSrvLedInfoRec));
if (sli==NULL)
return NULL; /* ALLOCATION ERROR */
if (dev->key && dev->key->xkbInfo)
@@ -585,9 +585,9 @@ Bool checkNames;
sli->names= NULL;
}
if ((sli->names==NULL)&&(needed_parts&XkbXI_IndicatorNamesMask))
- sli->names= xcalloc(XkbNumIndicators, sizeof(Atom));
+ sli->names= calloc(XkbNumIndicators, sizeof(Atom));
if ((sli->maps==NULL)&&(needed_parts&XkbXI_IndicatorMapsMask))
- sli->maps= xcalloc(XkbNumIndicators, sizeof(XkbIndicatorMapRec));
+ sli->maps= calloc(XkbNumIndicators, sizeof(XkbIndicatorMapRec));
if (checkNames) {
register unsigned i,bit;
sli->namesPresent= 0;
@@ -605,12 +605,12 @@ void
XkbFreeSrvLedInfo(XkbSrvLedInfoPtr sli)
{
if ((sli->flags&XkbSLI_IsDefault)==0) {
- if (sli->maps) xfree(sli->maps);
- if (sli->names) xfree(sli->names);
+ if (sli->maps) free(sli->maps);
+ if (sli->names) free(sli->names);
}
sli->maps= NULL;
sli->names= NULL;
- xfree(sli);
+ free(sli);
return;
}
@@ -633,7 +633,7 @@ XkbCopySrvLedInfo( DeviceIntPtr from,
if (!src)
goto finish;
- sli_new = xcalloc(1, sizeof( XkbSrvLedInfoRec));
+ sli_new = calloc(1, sizeof( XkbSrvLedInfoRec));
if (!sli_new)
goto finish;
@@ -644,8 +644,8 @@ XkbCopySrvLedInfo( DeviceIntPtr from,
sli_new->fb.lf = lf;
if (!(sli_new->flags & XkbSLI_IsDefault)) {
- sli_new->names= xcalloc(XkbNumIndicators, sizeof(Atom));
- sli_new->maps= xcalloc(XkbNumIndicators, sizeof(XkbIndicatorMapRec));
+ sli_new->names= calloc(XkbNumIndicators, sizeof(Atom));
+ sli_new->maps= calloc(XkbNumIndicators, sizeof(XkbIndicatorMapRec));
} /* else sli_new->names/maps is pointing to
dev->key->xkbInfo->desc->names->indicators;
dev->key->xkbInfo->desc->names->indicators; */
@@ -715,9 +715,9 @@ XkbSrvLedInfoPtr sli;
}
}
if ((sli->names==NULL)&&(needed_parts&XkbXI_IndicatorNamesMask))
- sli->names= xcalloc(XkbNumIndicators, sizeof(Atom));
+ sli->names= calloc(XkbNumIndicators, sizeof(Atom));
if ((sli->maps==NULL)&&(needed_parts&XkbXI_IndicatorMapsMask))
- sli->maps= xcalloc(XkbNumIndicators, sizeof(XkbIndicatorMapRec));
+ sli->maps= calloc(XkbNumIndicators, sizeof(XkbIndicatorMapRec));
return sli;
}