emcrisostomo / fswatch

A cross-platform file change monitor with multiple backends: Apple OS X File System Events, *BSD kqueue, Solaris/Illumos File Events Notification, Linux inotify, Microsoft Windows and a stat()-based backend.
https://emcrisostomo.github.io/fswatch/
GNU General Public License v3.0
4.96k stars 327 forks source link

Do not use global variable in function, pass parameter instead. #269

Closed goodpaperman closed 3 years ago

goodpaperman commented 3 years ago

simple type mistake, only reproduct on macOS (?) 'optarg' is a global variable, can be used directly, but macOS choked on that , and I see all other functions passing a parameter instead the global variable, so here just add a function parameter.

Signed-off-by: yunh haihai107@126.com

emcrisostomo commented 3 years ago

I can't reproduce it. However, I agree that we should not use the global variable there.