From b84473c7a0d4eea056c75ef922f48864865b98ef Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Tue, 18 Sep 2007 11:24:03 +0200 Subject: inotail.c: Set rc/ret when calling the functions --- inotail.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/inotail.c b/inotail.c index 920d5a5..74928f9 100644 --- a/inotail.c +++ b/inotail.c @@ -250,10 +250,9 @@ static ssize_t tail_pipe(struct file_struct *f) /* We will just tail everything here */ while ((rc = read(f->fd, buf, f->blksize)) > 0) { - if (write(STDOUT_FILENO, buf, (size_t) rc) <= 0) { + if ((rc = write(STDOUT_FILENO, buf, (size_t) rc)) <= 0) { /* e.g. when writing to a pipe which gets closed */ fprintf(stderr, "Error: Could not write to stdout (%s)\n", strerror(errno)); - rc = -1; break; } } @@ -348,9 +347,8 @@ static int handle_inotify_event(struct inotify_event *inev, struct file_struct * write_header(f->name); /* Seek to old file size */ - if (lseek(f->fd, f->size, SEEK_SET) == (off_t) -1) { + if ((ret = lseek(f->fd, f->size, SEEK_SET)) == (off_t) -1) { fprintf(stderr, "Error: Could not seek in file '%s' (%s)\n", f->name, strerror(errno)); - ret = -1; goto ignore; } @@ -359,9 +357,8 @@ static int handle_inotify_event(struct inotify_event *inev, struct file_struct * while ((rc = read(f->fd, fbuf, f->blksize)) != 0) write(STDOUT_FILENO, fbuf, (size_t) rc); - if (fstat(f->fd, &finfo) < 0) { + if ((ret = fstat(f->fd, &finfo)) < 0) { fprintf(stderr, "Error: Could not stat file '%s' (%s)\n", f->name, strerror(errno)); - ret = -1; free(fbuf); goto ignore; } -- cgit v1.2.3-54-g00ecf ef='/cgit.cgi/linux/net-next.git/refs/?id=458f7f8f819b63431f1098a086fafce4a503fb77'>refslogtreecommitdiff
path: root/sound/soc/soc-jack.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-03-30 00:39:44 +0200
committerThomas Gleixner <tglx@linutronix.de>2011-03-30 00:39:44 +0200
commit458f7f8f819b63431f1098a086fafce4a503fb77 (patch)
treea5bb0197700466bcfb9a658eb8cda3669389598b /sound/soc/soc-jack.c
parent28959f268f910b2cd1c25e838b63c342062e28f2 (diff)
sound: Fixup the last user of the old irq functions
I had seen that before, but now that I removed set_irq_wake it broke. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'sound/soc/soc-jack.c')