diff --git a/inotifyrun.c b/inotifyrun.c index 9b70fd6..ca03e79 100644 --- a/inotifyrun.c +++ b/inotifyrun.c @@ -50,7 +50,7 @@ int main(int argc, char **argv) { return EXIT_FAILURE; } // Initialise inotify - CATCH( + CATCH1( inotifier = inotify_init() ); // Get array of files and commands @@ -58,7 +58,7 @@ int main(int argc, char **argv) { struct fcmd_pair *assocs = (struct fcmd_pair *)(argv + 1); struct fcmdwatcher_pair *assocs_watches; struct fcmdwatcher_pair *watcherpair_ptr; - CATCH(assocs_watches = malloc((sizeof(struct fcmdwatcher_pair) * ((argc - 1) / 2)) + 1)); + CATCH1(assocs_watches = malloc((sizeof(struct fcmdwatcher_pair) * ((argc - 1) / 2)) + 1)); // Initlialise inotify further while checking if all files are actual files libcatch_behavior = 2; for (struct fcmd_pair *thispair = assocs; *(char**)thispair; thispair++) { @@ -72,7 +72,7 @@ int main(int argc, char **argv) { // Initialise inotify further watcherpair_ptr = &assocs_watches[thispair - assocs]; watcherpair_ptr->pair = thispair; - CATCH( + CATCH1( watcherpair_ptr->watcher = inotify_add_watch(inotifier, thispair->fname, IN_OPEN) ); } @@ -81,7 +81,7 @@ int main(int argc, char **argv) { struct inotify_event thisevent; while (1) { // Read new event - CATCH( + CATCH1( read(inotifier, &thisevent, sizeof(thisevent) + NAME_MAX + 1) ); // Find associated event pair diff --git a/libcatch b/libcatch index ff5cd85..76d61fc 160000 --- a/libcatch +++ b/libcatch @@ -1 +1 @@ -Subproject commit ff5cd8539ba0012e51f29a1c3e58928f1d1e80a6 +Subproject commit 76d61fc2010e0765612da792c2a6c35b1a453e62