* Remove unused structure member.
This commit is contained in:
parent
27738f3a26
commit
e79fbade4b
@ -33,7 +33,6 @@ struct watch
|
|||||||
int wd; /* watch descriptor */
|
int wd; /* watch descriptor */
|
||||||
char *path; /* watched path */
|
char *path; /* watched path */
|
||||||
struct watch *next;
|
struct watch *next;
|
||||||
struct watch *prev;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct watch *watches;
|
static struct watch *watches;
|
||||||
@ -73,7 +72,6 @@ add_watch(int fd, const char * path)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
nw->wd = wd;
|
nw->wd = wd;
|
||||||
nw->prev = lastwatch;
|
|
||||||
nw->next = NULL;
|
nw->next = NULL;
|
||||||
nw->path = strdup(path);
|
nw->path = strdup(path);
|
||||||
|
|
||||||
@ -125,7 +123,7 @@ inotify_create_watches(int fd)
|
|||||||
int i, rows = 0;
|
int i, rows = 0;
|
||||||
struct media_dir_s * media_path;
|
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 )
|
if( rows )
|
||||||
{
|
{
|
||||||
@ -483,7 +481,7 @@ inotify_remove_file(const char * path)
|
|||||||
for( i=1; i < rows; i++ )
|
for( i=1; i < rows; i++ )
|
||||||
{
|
{
|
||||||
free(sql);
|
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( sql_get_table(db, sql, &result2, NULL, NULL) == SQLITE_OK )
|
||||||
{
|
{
|
||||||
children = atoi(result2[1]);
|
children = atoi(result2[1]);
|
||||||
@ -498,7 +496,7 @@ inotify_remove_file(const char * path)
|
|||||||
{
|
{
|
||||||
*rindex(result[i], '$') = '\0';
|
*rindex(result[i], '$') = '\0';
|
||||||
free(sql);
|
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( sql_get_table(db, sql, &result2, NULL, NULL) == SQLITE_OK )
|
||||||
{
|
{
|
||||||
if( atoi(result2[1]) == 0 )
|
if( atoi(result2[1]) == 0 )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user