From 6e2b0ca9edaed200f250ef487701ad161aa4a168 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 11 Oct 2008 19:49:14 -0700 Subject: directory: don't use identical struct and variable names Duplicated tokens in close proximity takes too long for my head to parse; and "dir" is an easy and common abbreviation for "directory". --- src/dbUtils.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/dbUtils.c') diff --git a/src/dbUtils.c b/src/dbUtils.c index 9e307efc6..1fadb232e 100644 --- a/src/dbUtils.c +++ b/src/dbUtils.c @@ -45,20 +45,20 @@ typedef struct _SearchStats { unsigned long playTime; } SearchStats; -static int countSongsInDirectory(struct directory *directory, void *data) +static int countSongsInDirectory(struct directory *dir, void *data) { int *count = (int *)data; - *count += directory->songs.nr; + *count += dir->songs.nr; return 0; } -static int printDirectoryInDirectory(struct directory *directory, void *data) +static int printDirectoryInDirectory(struct directory *dir, void *data) { int fd = (int)(size_t)data; - if (!isRootDirectory(directory->path)) - fdprintf(fd, "directory: %s\n", directory_get_path(directory)); + if (!isRootDirectory(dir->path)) + fdprintf(fd, "directory: %s\n", directory_get_path(dir)); return 0; } -- cgit v1.2.3