Remove C99 code.
This commit is contained in:
parent
7428b8dede
commit
da30df3350
4
kqueue.c
4
kqueue.c
@ -181,7 +181,7 @@ static int
|
||||
kqueue_process(u_long timer)
|
||||
{
|
||||
struct event *ev;
|
||||
int events, n;
|
||||
int events, n, i;
|
||||
struct timespec ts, *tp;
|
||||
|
||||
n = (int) nchanges;
|
||||
@ -214,7 +214,7 @@ kqueue_process(u_long timer)
|
||||
DPRINTF(E_FATAL, L_GENERAL, "kevent() returned no events. EXITING\n");
|
||||
}
|
||||
|
||||
for (int i = 0; i < events; i++) {
|
||||
for (i = 0; i < events; i++) {
|
||||
if (event_list[i].flags & EV_ERROR) {
|
||||
DPRINTF(E_ERROR, L_GENERAL,
|
||||
"kevent() error %d on %d filter:%d flags:0x%x\n",
|
||||
|
@ -56,7 +56,7 @@ dir_vnode_process(struct event *ev, u_int fflags)
|
||||
struct watch *wt;
|
||||
const char *path;
|
||||
char *sql, **result, tmp_path[PATH_MAX], *esc_name;
|
||||
int rows, result_path_len;
|
||||
int rows, result_path_len, i;
|
||||
DIR* d;
|
||||
struct dirent *entry;
|
||||
bool found_flag;
|
||||
@ -86,7 +86,7 @@ dir_vnode_process(struct event *ev, u_int fflags)
|
||||
goto err1;
|
||||
}
|
||||
|
||||
for (int i = 1; i <= rows; i++) {
|
||||
for (i = 1; i <= rows; i++) {
|
||||
DPRINTF(E_DEBUG, L_INOTIFY,
|
||||
"Indexed content: %s\n", result[i]);
|
||||
if (access(result[i], R_OK) == -1)
|
||||
@ -116,7 +116,7 @@ dir_vnode_process(struct event *ev, u_int fflags)
|
||||
|
||||
DPRINTF(E_DEBUG, L_INOTIFY, "Walking %s\n", tmp_path);
|
||||
found_flag = false;
|
||||
for (int i = 1; i <= rows; i++) {
|
||||
for (i = 1; i <= rows; i++) {
|
||||
if (strcmp(result[i], tmp_path) == 0) {
|
||||
found_flag = true;
|
||||
break;
|
||||
@ -147,7 +147,7 @@ dir_vnode_process(struct event *ev, u_int fflags)
|
||||
goto err1;
|
||||
}
|
||||
|
||||
for (int i = 1; i <= rows; i++) {
|
||||
for (i = 1; i <= rows; i++) {
|
||||
DPRINTF(E_DEBUG, L_INOTIFY,
|
||||
"Indexed content: %s\n", result[i]);
|
||||
if (access(result[i], R_OK) == -1)
|
||||
@ -175,7 +175,7 @@ dir_vnode_process(struct event *ev, u_int fflags)
|
||||
}
|
||||
DPRINTF(E_DEBUG, L_INOTIFY, "Walking %s\n", tmp_path);
|
||||
found_flag = false;
|
||||
for (int i = 1; i <= rows; i++)
|
||||
for (i = 1; i <= rows; i++)
|
||||
if (strcmp(result[i], tmp_path) == 0) {
|
||||
found_flag = true;
|
||||
break;
|
||||
@ -262,14 +262,14 @@ kqueue_monitor_start()
|
||||
{
|
||||
struct media_dir_s *media_path;
|
||||
char **result;
|
||||
int rows;
|
||||
int rows, i;
|
||||
|
||||
DPRINTF(E_DEBUG, L_INOTIFY, "kqueue monitoring starting\n");
|
||||
for (media_path = media_dirs; media_path != NULL;
|
||||
media_path = media_path->next)
|
||||
add_watch(0, media_path->path);
|
||||
sql_get_table(db, "SELECT PATH from DETAILS where MIME is NULL and PATH is not NULL", &result, &rows, NULL);
|
||||
for (int i = 1; i <= rows; i++ )
|
||||
for (i = 1; i <= rows; i++ )
|
||||
add_watch(0, result[i]);
|
||||
sqlite3_free_table(result);
|
||||
}
|
||||
|
6
select.c
6
select.c
@ -146,11 +146,11 @@ select_process(u_long msec)
|
||||
{
|
||||
struct timeval tv, *tp;
|
||||
struct event *ev;
|
||||
int ready;
|
||||
int ready, i;
|
||||
|
||||
/* Need to rescan for max_fd. */
|
||||
if (max_fd == -1)
|
||||
for (int i = 0; i < nevents; i++) {
|
||||
for (i = 0; i < nevents; i++) {
|
||||
if (max_fd < events[i]->fd)
|
||||
max_fd = events[i]->fd;
|
||||
}
|
||||
@ -173,7 +173,7 @@ select_process(u_long msec)
|
||||
if (ready == 0)
|
||||
return (0);
|
||||
|
||||
for (int i = 0; i < nevents; i++) {
|
||||
for (i = 0; i < nevents; i++) {
|
||||
ev = events[i];
|
||||
|
||||
switch (ev->rdwr) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user