]> git.pld-linux.org Git - packages/fam.git/commitdiff
- replace few NULL with 0 for c++.
authorPaweł Sikora <pluto@pld-linux.org>
Sat, 30 Aug 2008 11:46:52 +0000 (11:46 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    fam-dnotify.patch -> 1.5

fam-dnotify.patch

index a73b5d5767ac7d953d4f90b73a193257c7c3fd49..8644312807e17ec9b7eee13b0bca023facc2fc89 100644 (file)
@@ -64,7 +64,7 @@
 +    FileWatch *hash_link;
 +    
 +    FileWatch(void) {
 +    FileWatch *hash_link;
 +    
 +    FileWatch(void) {
-+      dir_watch = NULL;
++      dir_watch = 0;
 +      n_dir_watches = 0;
 +    }
 +
 +      n_dir_watches = 0;
 +    }
 +
@@ -85,7 +85,7 @@
 +      Node *first;
 +
 +      FileWatchList(void) {
 +      Node *first;
 +
 +      FileWatchList(void) {
-+          first = NULL;
++          first = 0;
 +      }
 +      
 +      void prepend(FileWatch *watch);
 +      }
 +      
 +      void prepend(FileWatch *watch);
 +bool
 +DNotify::DirWatch::FileWatchList::empty(void)
 +{
 +bool
 +DNotify::DirWatch::FileWatchList::empty(void)
 +{
-+    return first == NULL;
++    return first == 0;
 +}
 +
 +int
 +}
 +
 +int
 +    Node *l, *prev;
 +    
 +    l = first;
 +    Node *l, *prev;
 +    
 +    l = first;
-+    prev = NULL;
++    prev = 0;
 +    while (l) {
 +      if (l->watch == watch) {
 +          if (prev)
 +    while (l) {
 +      if (l->watch == watch) {
 +          if (prev)
 +
 +DNotify::DNotify(EventHandler h)
 +{
 +
 +DNotify::DNotify(EventHandler h)
 +{
-+    assert(ehandler == NULL);
++    assert(ehandler == 0);
 +    ehandler = h;
 +}
 +
 +    ehandler = h;
 +}
 +
 +          Log::debug("closed pipe write end");
 +      pipe_read_fd = -1;
 +    }
 +          Log::debug("closed pipe write end");
 +      pipe_read_fd = -1;
 +    }
-+    ehandler = NULL;
++    ehandler = 0;
 +}
 +
 +void
 +}
 +
 +void
 +      }
 +  }
 +  
 +      }
 +  }
 +  
-+  return NULL;
++  return 0;
 +}
 +
 +DNotify::FileWatch *
 +}
 +
 +DNotify::FileWatch *
 +      }
 +      p = &(*p)->hash_link;
 +  }
 +      }
 +      p = &(*p)->hash_link;
 +  }
-+  w->hash_link = NULL;
++  w->hash_link = 0;
 +}
 +
 +void
 +}
 +
 +void
 +      }
 +      p = &(*p)->hash_link;
 +  }
 +      }
 +      p = &(*p)->hash_link;
 +  }
-+  w->hash_link = NULL;
++  w->hash_link = 0;
 +}
 +
 +DNotify::Status
 +}
 +
 +DNotify::Status
 +      Log::debug ("New DirWatch for %s (%x %x)\n",
 +                  notify_dir, (int)stat.st_dev, (int)stat.st_ino);
 +      dwatch = new DirWatch;
 +      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);
 +      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;
 +    // 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) {
 +      status = &st;
 +    }
 +    if (::lstat(name, status) == -1) {
 +
 +    // Lookup FileWatch by dev:ino, and its DirWatch.
 +    fwatch = lookup_filewatch (dev, ino);
 +
 +    // 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
 +      return BAD;
 +
 +    // delete FileWatch, if last FileWatch: close fd, delete DirWatch
          // Express interest.
          IMon::Status s = IMon::BAD;
 -      s = imon.express(name(), NULL);
          // 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;
          }
          if (s != IMon::OK) {
              return true;
          }
This page took 0.058025 seconds and 4 git commands to generate.