+ FileWatch *hash_link;
+
+ FileWatch(void) {
-+ dir_watch = NULL;
++ dir_watch = 0;
+ n_dir_watches = 0;
+ }
+
+ Node *first;
+
+ FileWatchList(void) {
-+ first = NULL;
++ first = 0;
+ }
+
+ void prepend(FileWatch *watch);
+bool
+DNotify::DirWatch::FileWatchList::empty(void)
+{
-+ return first == NULL;
++ return first == 0;
+}
+
+int
+ Node *l, *prev;
+
+ l = first;
-+ prev = NULL;
++ prev = 0;
+ while (l) {
+ if (l->watch == watch) {
+ if (prev)
+
+DNotify::DNotify(EventHandler h)
+{
-+ assert(ehandler == NULL);
++ assert(ehandler == 0);
+ ehandler = h;
+}
+
+ Log::debug("closed pipe write end");
+ pipe_read_fd = -1;
+ }
-+ ehandler = NULL;
++ ehandler = 0;
+}
+
+void
+ }
+ }
+
-+ return NULL;
++ return 0;
+}
+
+DNotify::FileWatch *
+ }
+ p = &(*p)->hash_link;
+ }
-+ w->hash_link = NULL;
++ w->hash_link = 0;
+}
+
+void
+ }
+ p = &(*p)->hash_link;
+ }
-+ w->hash_link = NULL;
++ w->hash_link = 0;
+}
+
+DNotify::Status
+ Log::debug ("New DirWatch for %s (%x %x)\n",
+ notify_dir, (int)stat.st_dev, (int)stat.st_ino);
+ dwatch = new DirWatch;
-+ dwatch->hash_link = NULL;
++ dwatch->hash_link = 0;
+ dwatch->dir_dev = stat.st_dev;
+ dwatch->dir_ino = stat.st_ino;
+ dwatch->fd = open(notify_dir, O_RDONLY);
+ // to a recycled inode that we don't otherwise care about.
+ //
+ struct stat st;
-+ if (status == NULL) {
++ if (status == 0) {
+ status = &st;
+ }
+ if (::lstat(name, status) == -1) {
+
+ // Lookup FileWatch by dev:ino, and its DirWatch.
+ fwatch = lookup_filewatch (dev, ino);
-+ if (fwatch == NULL)
++ if (fwatch == 0)
+ return BAD;
+
+ // delete FileWatch, if last FileWatch: close fd, delete DirWatch
// Express interest.
IMon::Status s = IMon::BAD;
- s = imon.express(name(), NULL);
-+ s = monitor->express(name(), NULL);
++ s = monitor->express(name(), 0);
if (s != IMon::OK) {
return true;
}