diff options
author | Mikhail Gusarov <dottedmag@dottedmag.net> | 2010-05-06 01:44:06 +0700 |
---|---|---|
committer | Mikhail Gusarov <dottedmag@dottedmag.net> | 2010-05-13 00:22:37 +0700 |
commit | 3f3ff971ecff9936cebafc813af9193b97bba89c (patch) | |
tree | fdbbad794a42488b7ffe41eed7aba4e498335f55 /record/set.c | |
parent | 96c7ab27c383ec767f62a7a11e5fd76f86363fbc (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 'record/set.c')
-rw-r--r-- | record/set.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/record/set.c b/record/set.c index f0e094eed..f2064fd3c 100644 --- a/record/set.c +++ b/record/set.c @@ -87,7 +87,7 @@ typedef struct { static void BitVectorDestroySet(RecordSetPtr pSet) { - xfree(pSet); + free(pSet); } static unsigned long @@ -199,7 +199,7 @@ BitVectorCreateSet(RecordSetInterval *pIntervals, int nIntervals, } else { - pbvs = (BitVectorSetPtr)Xcalloc(memsize); + pbvs = (BitVectorSetPtr)calloc(1, memsize); if (!pbvs) return NULL; pbvs->baseSet.ops = &BitVectorSetOperations; } @@ -233,7 +233,7 @@ typedef struct { static void IntervalListDestroySet(RecordSetPtr pSet) { - xfree(pSet); + free(pSet); } static unsigned long @@ -302,7 +302,7 @@ IntervalListCreateSet(RecordSetInterval *pIntervals, int nIntervals, if (nIntervals > 0) { - stackIntervals = (RecordSetInterval *)xalloc( + stackIntervals = (RecordSetInterval *)malloc( sizeof(RecordSetInterval) * nIntervals); if (!stackIntervals) return NULL; @@ -353,14 +353,14 @@ IntervalListCreateSet(RecordSetInterval *pIntervals, int nIntervals, else { prls = (IntervalListSetPtr) - xalloc(sizeof(IntervalListSet) + nIntervals * sizeof(RecordSetInterval)); + malloc(sizeof(IntervalListSet) + nIntervals * sizeof(RecordSetInterval)); if (!prls) goto bailout; prls->baseSet.ops = &IntervalListSetOperations; } memcpy(&prls[1], stackIntervals, nIntervals * sizeof(RecordSetInterval)); prls->nIntervals = nIntervals; bailout: - if (stackIntervals) xfree(stackIntervals); + if (stackIntervals) free(stackIntervals); return (RecordSetPtr)prls; } |