Skip to content

Commit fd38dbe

Browse files
committed
remove extra semicolons
1 parent eff68fd commit fd38dbe

2 files changed

Lines changed: 20 additions & 20 deletions

File tree

src/bindfs.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -395,15 +395,15 @@ static int filefilter_check(const char *path, mode_t mode, mode_t *f_mode)
395395
} else { /* is it possible? */
396396
errno = EIO;
397397
goto out;
398-
};
398+
}
399399
} else {
400400
/* To protect hidden files from overwriting (say, we have
401401
* 'p:testfifo' policy and do 'mv regular_file testfifo'),
402402
* we should check mode of existing files on write operations,
403403
* not desired mode for new file */
404404
which = mode ? OVERWRITE : EXISTING;
405405
mode = st.st_mode;
406-
};
406+
}
407407

408408
mode &= S_IFMT;
409409

@@ -415,7 +415,7 @@ static int filefilter_check(const char *path, mode_t mode, mode_t *f_mode)
415415
if (filefilter_find_match(settings.filefilter,fn,mode) == filefilter_status_found) {
416416
errno = (which == NEW || which == OVERWRITE) ? EPERM : ENOENT;
417417
goto out;
418-
};
418+
}
419419

420420
errno = 0;
421421
out:
@@ -2397,7 +2397,7 @@ static int parse_file_filter(FileFilter *filter, char *spec)
23972397
if (strlen(spec) < 1) {
23982398
fprintf(stderr,"Pattern string not specified\n");
23992399
return 0;
2400-
};
2400+
}
24012401

24022402
/* Glob pattern might be longer than NAME_MAX, so don't use it
24032403
* as a limit. But in the other side, ARG_MAX on Linux is 2MB,
@@ -2424,8 +2424,8 @@ static int parse_file_filter(FileFilter *filter, char *spec)
24242424
type = FFT_ANY;
24252425
cpos = FN;
24262426
continue;
2427-
};
2428-
};
2427+
}
2428+
}
24292429

24302430
if (cpos == MODE) {
24312431
switch(*p) {
@@ -2442,41 +2442,41 @@ static int parse_file_filter(FileFilter *filter, char *spec)
24422442
if (next == '/' || next == '\0') {
24432443
fprintf(stderr,"Invalid syntax: matching pattern not specified after mode specifier\n");
24442444
goto fail;
2445-
};
2445+
}
24462446
cpos = FN;
24472447
continue;
24482448
break;
24492449
default:
24502450
fprintf(stderr,"Invalid syntax: '%c' is not a valid mode token\n",*p);
24512451
goto fail;
24522452
break;
2453-
};
2454-
};
2453+
}
2454+
}
24552455

24562456
if (cpos == FN) {
24572457
if (fn_pos >= FF_FN_LIMIT-1) {
24582458
fprintf(stderr,"Filename pattern too long\n");
24592459
goto fail;
2460-
};
2460+
}
24612461
if (*p == '/' || *p == '\0') {
24622462
fprintf(stderr,"Empty filename pattern\n");
24632463
goto fail;
2464-
};
2464+
}
24652465

24662466
fn[fn_pos++] = *p;
24672467
if (next == '/' || next == '\0') {
24682468
fn[fn_pos] = '\0';
24692469
if ((ret = filefilter_add(settings.filefilter,fn,type)) != filefilter_status_ok) {
24702470
fprintf(stderr,"Inserting filter spec '%s' failed: %s\n",fn,ffstatus_str(ret));
24712471
goto fail;
2472-
};
2472+
}
24732473
fn_pos = 0;
24742474
free(fn);
24752475
fn = malloc(FF_FN_LIMIT);
24762476
cpos = SLASH;
24772477
continue;
2478-
};
2479-
};
2478+
}
2479+
}
24802480
}
24812481

24822482
free(fn);

src/filter.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ FFStatus filefilter_add(FileFilter *f, char *spec, FFType type)
6363
while(f->name[++pos] != NULL) {
6464
if (strcmp(f->name[pos],newname) == 0)
6565
return filefilter_status_dupfound;
66-
};
66+
}
6767
f->name = (char**)realloc(f->name, sizeof(char*)*(pos+2));
6868
f->type = (FFType*)realloc(f->type, sizeof(FFType)*(pos+2));
6969
f->has_wildcard = (char*)realloc(f->has_wildcard, sizeof(char)*(pos+2));
@@ -93,7 +93,7 @@ FFStatus filefilter_add(FileFilter *f, char *spec, FFType type)
9393
f->has_wildcard[pos] = 1;
9494
} else {
9595
f->has_wildcard[pos] = 0;
96-
};
96+
}
9797

9898
return filefilter_status_ok;
9999
}
@@ -105,10 +105,10 @@ FFStatus filefilter_find_match(FileFilter *f, char *fn, mode_t type)
105105

106106
if (strlen(fn) == 0) {
107107
return filefilter_status_incorrect_name;
108-
};
108+
}
109109
if (!(type_b&FFT_ANY)) {
110110
return filefilter_status_incorrect_mode;
111-
};
111+
}
112112

113113
while(f->name[++pos] != NULL) {
114114
if (!(f->type[pos]&type_b))
@@ -119,8 +119,8 @@ FFStatus filefilter_find_match(FileFilter *f, char *fn, mode_t type)
119119
} else {
120120
if (strcmp(f->name[pos],fn) == 0)
121121
return filefilter_status_found;
122-
};
123-
};
122+
}
123+
}
124124

125125
return filefilter_status_notfound;
126126
}

0 commit comments

Comments
 (0)