diff options
author | Christophe Fergeau | 2009-11-17 20:59:39 +0100 |
---|---|---|
committer | Jonathan Beck | 2009-11-19 17:59:45 +0100 |
commit | d503698b5e2c709fcf581a4c19f64bf36b6a1bea (patch) | |
tree | e1f062f8d36d7ae1393d33f5052d91f861cf1a1f | |
parent | 7a136312614f4d853898d6e0ad96b69af2d232be (diff) | |
download | libplist-d503698b5e2c709fcf581a4c19f64bf36b6a1bea.tar.gz libplist-d503698b5e2c709fcf581a4c19f64bf36b6a1bea.tar.bz2 |
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.
-rw-r--r-- | src/plist.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; } |