Commit 457301d9 authored by Max Kellermann's avatar Max Kellermann

compress: use GLib instead of utils.h

parent dec4e4ca
......@@ -21,7 +21,8 @@
*/
#include "compress.h"
#include "utils.h"
#include <glib.h>
#include <stdint.h>
#include <string.h>
......@@ -66,7 +67,7 @@ void CompressCfg(int show_mon, int anticlip, int target, int gainmax,
prefs.buckets = buckets;
/* Allocate the peak structure */
peaks = xrealloc(peaks, sizeof(int)*prefs.buckets);
peaks = g_realloc(peaks, sizeof(int)*prefs.buckets);
if (prefs.buckets > lastsize)
memset(peaks + lastsize, 0, sizeof(int)*(prefs.buckets
......@@ -165,8 +166,7 @@ void CompressFree(void)
}
#endif
if (peaks)
free(peaks);
g_free(peaks);
}
void CompressDo(void *data, unsigned int length)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment