misc/160866: Swapped arguments in fifo_misc.c
Henning Petersen
henning.petersen at t-online.de
Wed Sep 21 12:50:06 UTC 2011
>Number: 160866
>Category: misc
>Synopsis: Swapped arguments in fifo_misc.c
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Sep 21 12:50:05 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Henning Petersen
>Release: FreeBSD-current
>Organization:
>Environment:
>Description:
Swapped arguments in fifo_misc.c .
>How-To-Repeat:
>Fix:
diff -u -r1.6 fifo_misc.c
--- tools/regression/fifo/fifo_misc/fifo_misc.c 31 Dec 2009 20:29:58 -0000 1.6
+++ tools/regression/fifo/fifo_misc/fifo_misc.c 21 Sep 2011 08:50:14 -0000
@@ -115,7 +115,7 @@
exit(-1);
}
- if (lseek(reader_fd, SEEK_CUR, 1) >= 0) {
+ if (lseek(reader_fd, 1, SEEK_CUR) >= 0) {
warnx("%s: lseek succeeded instead of returning ESPIPE",
__func__);
cleanfifo("testfifo", reader_fd, writer_fd);
Patch attached with submission follows:
diff -u -r1.6 fifo_misc.c
--- tools/regression/fifo/fifo_misc/fifo_misc.c 31 Dec 2009 20:29:58 -0000 1.6
+++ tools/regression/fifo/fifo_misc/fifo_misc.c 21 Sep 2011 08:50:14 -0000
@@ -115,7 +115,7 @@
exit(-1);
}
- if (lseek(reader_fd, SEEK_CUR, 1) >= 0) {
+ if (lseek(reader_fd, 1, SEEK_CUR) >= 0) {
warnx("%s: lseek succeeded instead of returning ESPIPE",
__func__);
cleanfifo("testfifo", reader_fd, writer_fd);
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list