From e79fbade4b338cfc4d3424c0ce6121b466d68364 Mon Sep 17 00:00:00 2001 From: Justin Maggard Date: Thu, 30 Apr 2009 09:50:22 +0000 Subject: [PATCH] * Remove unused structure member. --- inotify.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/inotify.c b/inotify.c index 17cff50..2a8a639 100644 --- a/inotify.c +++ b/inotify.c @@ -33,7 +33,6 @@ struct watch int wd; /* watch descriptor */ char *path; /* watched path */ struct watch *next; - struct watch *prev; }; static struct watch *watches; @@ -73,7 +72,6 @@ add_watch(int fd, const char * path) return -1; } nw->wd = wd; - nw->prev = lastwatch; nw->next = NULL; nw->path = strdup(path); @@ -125,7 +123,7 @@ inotify_create_watches(int fd) int i, rows = 0; struct media_dir_s * media_path; - if( sql_get_table(db, "SELECT count(ID) from DETAILS where SIZE is NULL and PATH is not NULL", &result, &rows, NULL) == SQLITE_OK ) + if( sql_get_table(db, "SELECT count(*) from DETAILS where SIZE is NULL and PATH is not NULL", &result, &rows, NULL) == SQLITE_OK ) { if( rows ) { @@ -483,7 +481,7 @@ inotify_remove_file(const char * path) for( i=1; i < rows; i++ ) { free(sql); - asprintf(&sql, "SELECT count(OBJECT_ID) from OBJECTS where PARENT_ID = '%s'", result[i]); + asprintf(&sql, "SELECT count(*) from OBJECTS where PARENT_ID = '%s'", result[i]); if( sql_get_table(db, sql, &result2, NULL, NULL) == SQLITE_OK ) { children = atoi(result2[1]); @@ -498,7 +496,7 @@ inotify_remove_file(const char * path) { *rindex(result[i], '$') = '\0'; free(sql); - asprintf(&sql, "SELECT count(OBJECT_ID) from OBJECTS where PARENT_ID = '%s'", result[i]); + asprintf(&sql, "SELECT count(*) from OBJECTS where PARENT_ID = '%s'", result[i]); if( sql_get_table(db, sql, &result2, NULL, NULL) == SQLITE_OK ) { if( atoi(result2[1]) == 0 )