diff options
author | 2010-09-18 09:51:16 +0800 | |
---|---|---|
committer | 2010-09-18 09:51:16 +0800 | |
commit | c6372a1b3f56d7022f135b8f1baeaff44816ec7c (patch) | |
tree | 1e274b07fc1942d7f39d334771c7d621a164b15f /xdgmimeparent.c | |
parent | 41b8db063c032c673e366d81bccf37022b9c1d4f (diff) |
remove trailing spaces
This is done by `sed -i -e 's/[ \t]*$//' *.[c,h]`, which should not
introduce any functionality change.
Diffstat (limited to 'xdgmimeparent.c')
-rw-r--r-- | xdgmimeparent.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/xdgmimeparent.c b/xdgmimeparent.c index 511bbacb..30648e3e 100644 --- a/xdgmimeparent.c +++ b/xdgmimeparent.c @@ -73,7 +73,7 @@ _xdg_mime_parent_list_new (void) return list; } -void +void _xdg_mime_parent_list_free (XdgParentList *list) { int i; @@ -159,13 +159,13 @@ _xdg_mime_parent_read_from_file (XdgParentList *list, break; } } - + if (!entry) { if (list->n_mimes == alloc) { alloc <<= 1; - list->parents = realloc (list->parents, + list->parents = realloc (list->parents, alloc * sizeof (XdgMimeParents)); } list->parents[list->n_mimes].mime = strdup (line); @@ -182,25 +182,25 @@ _xdg_mime_parent_read_from_file (XdgParentList *list, else { entry->n_parents += 1; - entry->parents = realloc (entry->parents, + entry->parents = realloc (entry->parents, (entry->n_parents + 2) * sizeof (char *)); } entry->parents[entry->n_parents - 1] = strdup (sep); entry->parents[entry->n_parents] = NULL; } - list->parents = realloc (list->parents, + list->parents = realloc (list->parents, list->n_mimes * sizeof (XdgMimeParents)); - fclose (file); - + fclose (file); + if (list->n_mimes > 1) - qsort (list->parents, list->n_mimes, + qsort (list->parents, list->n_mimes, sizeof (XdgMimeParents), &parent_entry_cmp); } -void +void _xdg_mime_parent_list_dump (XdgParentList *list) { int i; |