Fix a used-uninitialised warning in new.c by having the check_folders()
routine return first=last=NULL for empty folder lists. This is a more
sensible API anyway. (It would not actually have been possible for
the code to try to use last while it was uninitialised, as it happens.)
Signed-off-by: Peter Maydell <pmaydell@chiark.greenend.org.uk>
* `cur' points to the name of the current folder, `folders' points to the
* name of a .folder (if NULL, crawl all folders), and `sequences' points to
* the array of sequences for which to look.
+ *
+ * An empty list is returned as first=last=NULL.
*/
static void
check_folders(struct node **first, struct node **last,
char *line;
size_t len;
- *first = *cur_node = NULL;
+ *first = *last = *cur_node = NULL;
*maxlen = 0;
b.first = first;