diff options
author | Max Kellermann <max@duempel.org> | 2011-09-10 07:41:14 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-09-10 07:48:05 +0200 |
commit | 4af63627513bfc76116d1643de095047045343a5 (patch) | |
tree | 0ed638f9c5e206c55647c26ca84dbf169426b690 /src | |
parent | d54075197fa1dc8783d33586984a235d4e2e3831 (diff) | |
download | mpd-4af63627513bfc76116d1643de095047045343a5.tar.gz mpd-4af63627513bfc76116d1643de095047045343a5.tar.xz mpd-4af63627513bfc76116d1643de095047045343a5.zip |
directory_save: pass const pointer to _save()
Diffstat (limited to 'src')
-rw-r--r-- | src/directory_save.c | 6 | ||||
-rw-r--r-- | src/directory_save.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/directory_save.c b/src/directory_save.c index 71a75f8a9..912e71e0e 100644 --- a/src/directory_save.c +++ b/src/directory_save.c @@ -42,9 +42,8 @@ directory_quark(void) } void -directory_save(FILE *fp, struct directory *directory) +directory_save(FILE *fp, const struct directory *directory) { - struct dirvec *children = &directory->children; size_t i; if (!directory_is_root(directory)) { @@ -55,8 +54,9 @@ directory_save(FILE *fp, struct directory *directory) directory_get_path(directory)); } + const struct dirvec *children = &directory->children; for (i = 0; i < children->nr; ++i) { - struct directory *cur = children->base[i]; + const struct directory *cur = children->base[i]; char *base = g_path_get_basename(cur->path); fprintf(fp, DIRECTORY_DIR "%s\n", base); diff --git a/src/directory_save.h b/src/directory_save.h index 626c99c73..2d0056830 100644 --- a/src/directory_save.h +++ b/src/directory_save.h @@ -28,7 +28,7 @@ struct directory; void -directory_save(FILE *fp, struct directory *directory); +directory_save(FILE *fp, const struct directory *directory); bool directory_load(FILE *fp, struct directory *directory, |