Compare commits

...

1 commit

Author SHA1 Message Date
Geoff Greer
087c3ad8a3 Fix gcc warning about shadowed var named "pipe" 2015-09-05 23:13:33 -07:00

View file

@ -222,7 +222,7 @@ void search_file(const char *file_full_path) {
char *buf = NULL;
struct stat statbuf;
int rv = 0;
FILE *pipe = NULL;
FILE *fp = NULL;
fd = open(file_full_path, O_RDONLY);
if (fd < 0) {
@ -249,9 +249,9 @@ void search_file(const char *file_full_path) {
if (statbuf.st_mode & S_IFIFO) {
log_debug("%s is a named pipe. stream searching", file_full_path);
pipe = fdopen(fd, "r");
search_stream(pipe, file_full_path);
fclose(pipe);
fp = fdopen(fd, "r");
search_stream(fp, file_full_path);
fclose(fp);
goto cleanup;
}