mirror of
https://github.com/fscotto/fsnap.git
synced 2026-11-26 03:09:51 +00:00
Refactor operation function definition
This commit is contained in:
@@ -11,7 +11,8 @@ static long pathmax = PATH_MAX;
|
||||
static long pathmax = 1024;
|
||||
#endif
|
||||
|
||||
int print_file(const char *file) {
|
||||
static int print_file(const char *file, void *context) {
|
||||
(void)context;
|
||||
printf("[%s]\n", file);
|
||||
return 0;
|
||||
}
|
||||
@@ -27,5 +28,5 @@ int scan(const char *directory) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return walk(dir, print_file);
|
||||
return walk(dir, print_file, NULL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user