summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-10-29 16:28:57 -0700
committerJeremy Allison <jra@samba.org>2008-10-29 16:28:57 -0700
commit35ef924f33a7b5e74d9319e6fdd4092cdf625f77 (patch)
treefccb28c57d5c86645bbd6975a44cf887fff89079 /source3/smbd
parentf1a70d1e2aad74d25c312b21a8ba3fc4b0e52839 (diff)
downloadsamba-35ef924f33a7b5e74d9319e6fdd4092cdf625f77.tar.gz
samba-35ef924f33a7b5e74d9319e6fdd4092cdf625f77.tar.bz2
samba-35ef924f33a7b5e74d9319e6fdd4092cdf625f77.zip
Fix CID 574 - tidies up the code expression.
Jeremy.
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/notify_inotify.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/smbd/notify_inotify.c b/source3/smbd/notify_inotify.c
index fa0f0ed51d..c6c12a9cd2 100644
--- a/source3/smbd/notify_inotify.c
+++ b/source3/smbd/notify_inotify.c
@@ -243,14 +243,14 @@ static void inotify_handler(struct event_context *ev, struct fd_event *fde,
e0 = e = (struct inotify_event *)TALLOC_SIZE(in, bufsize);
if (e == NULL) return;
- if (read(in->fd, e0, bufsize) != bufsize) {
+ if (sys_read(in->fd, e0, bufsize) != bufsize) {
DEBUG(0,("Failed to read all inotify data\n"));
talloc_free(e0);
return;
}
/* we can get more than one event in the buffer */
- while (bufsize >= sizeof(*e)) {
+ while (e && (bufsize >= sizeof(*e))) {
struct inotify_event *e2 = NULL;
bufsize -= e->len + sizeof(*e);
if (bufsize >= sizeof(*e)) {