Skip to content

Commit fa1cb8b

Browse files
committed
Resync
1 parent 92e7fe4 commit fa1cb8b

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

formats/xml/rxml.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,11 @@ rxml_document_t *rxml_load_document_string(const char *str)
251251
attr = attr->next = (struct rxml_attrib_node*)
252252
calloc(1, sizeof(*attr));
253253
else
254-
attr = node->attrib = (struct rxml_attrib_node*)calloc(1, sizeof(*attr));
254+
{
255+
attr = (struct rxml_attrib_node*)calloc(1, sizeof(*attr));
256+
if (node && attr)
257+
node->attrib = attr;
258+
}
255259

256260
if (attr->attrib)
257261
free(attr->attrib);

include/defines/gx_defines.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,6 @@
8282
src += tmp_pitch; \
8383
}
8484

85-
#define CHUNK_FRAMES 64
86-
#define CHUNK_SIZE (CHUNK_FRAMES * sizeof(uint32_t))
87-
#define BLOCKS 16
88-
8985
#define AIInit AUDIO_Init
9086
#define AIInitDMA AUDIO_InitDMA
9187
#define AIStartDMA AUDIO_StartDMA

queues/fifo_queue.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ void fifo_read(fifo_buffer_t *buffer, void *in_buf, size_t len)
119119
}
120120

121121
memcpy(in_buf, (const uint8_t*)buffer->buffer + buffer->first, first_read);
122-
memcpy((uint8_t*)in_buf + first_read, buffer->buffer, rest_read);
122+
if (rest_read > 0)
123+
memcpy((uint8_t*)in_buf + first_read, buffer->buffer, rest_read);
123124

124125
buffer->first = (buffer->first + len) % buffer->size;
125126
}

0 commit comments

Comments
 (0)