From d503698b5e2c709fcf581a4c19f64bf36b6a1bea Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Tue, 17 Nov 2009 20:59:39 +0100 Subject: add missing break; in switch statement The 2nd missing break was harmless since it fell through the default: case which has a break, but it makes things more robust if we were ever to add new cases to this switch. The 1st missing break; was causing warnings in valgrind since we ended up calling strdup on a memory zone not containing a \0 character. --- src/plist.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plist.c b/src/plist.c index eac7cc0..ed83e3c 100644 --- a/src/plist.c +++ b/src/plist.c @@ -182,9 +182,11 @@ static void plist_copy_node(GNode * node, gpointer parent_node_ptr) case PLIST_DATA: newdata->buff = (uint8_t *) malloc(data->length); memcpy(newdata->buff, data->buff, data->length); + break; case PLIST_KEY: case PLIST_STRING: newdata->strval = strdup((char *) data->strval); + break; default: break; } -- cgit v1.1-32-gdbae