diff options
Diffstat (limited to 'src/xine-engine/scratch.c')
-rw-r--r-- | src/xine-engine/scratch.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/xine-engine/scratch.c b/src/xine-engine/scratch.c index 4b941f8c0..f01ea9c7d 100644 --- a/src/xine-engine/scratch.c +++ b/src/xine-engine/scratch.c @@ -49,12 +49,11 @@ static void __attribute__((__format__(__printf__, 2, 0))) localtime_r (&t, &tm); if ( ! this->lines[this->cur] ) - this->lines[this->cur] = xine_xmalloc(SCRATCH_LINE_LEN_MAX+1); + this->lines[this->cur] = malloc(SCRATCH_LINE_LEN_MAX+1); if ( ! this->lines[this->cur] ) return; - strftime (this->lines[this->cur], SCRATCH_LINE_LEN_MAX, "%X: ", &tm); - l = strlen (this->lines[this->cur]); + l = strftime (this->lines[this->cur], SCRATCH_LINE_LEN_MAX, "%X: ", &tm); vsnprintf (this->lines[this->cur] + l, SCRATCH_LINE_LEN_MAX - l, format, argp); lprintf ("printing format %s to line %d\n", format, this->cur); @@ -105,7 +104,7 @@ static void scratch_dispose (scratch_buffer_t *this) { scratch_buffer_t *_x_new_scratch_buffer (int num_lines) { scratch_buffer_t *this; - this = xine_xmalloc (sizeof (scratch_buffer_t)); + this = calloc(1, sizeof(scratch_buffer_t)); this->lines = calloc ((num_lines + 1), sizeof(char*)); this->ordered = calloc ((num_lines + 1), sizeof(char*)); |