Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148008600
D45149.id138337.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D45149.id138337.diff
View Options
diff --git a/bin/cat/cat.c b/bin/cat/cat.c
--- a/bin/cat/cat.c
+++ b/bin/cat/cat.c
@@ -198,7 +198,7 @@
stdout_lock.l_start = 0;
stdout_lock.l_type = F_WRLCK;
stdout_lock.l_whence = SEEK_SET;
- if (fcntl(STDOUT_FILENO, F_SETLKW, &stdout_lock) == -1)
+ if (fcntl(STDOUT_FILENO, F_SETLKW, &stdout_lock) != 0)
err(EXIT_FAILURE, "stdout");
}
@@ -266,7 +266,7 @@
#endif
} else {
#ifndef BOOTSTRAP_CAT
- if (in_kernel_copy(fd) == -1) {
+ if (in_kernel_copy(fd) != 0) {
if (errno == EINVAL || errno == EBADF ||
errno == EISDIR)
raw_cat(fd);
@@ -500,12 +500,12 @@
switch (flags & O_ACCMODE) {
case O_RDONLY:
cap_rights_clear(&rights, CAP_WRITE);
- if (shutdown(fd, SHUT_WR) == -1)
+ if (shutdown(fd, SHUT_WR) != 0)
warn(NULL);
break;
case O_WRONLY:
cap_rights_clear(&rights, CAP_READ);
- if (shutdown(fd, SHUT_RD) == -1)
+ if (shutdown(fd, SHUT_RD) != 0)
warn(NULL);
break;
default:
@@ -513,7 +513,7 @@
}
cap_rights_clear(&rights, CAP_CONNECT, CAP_SHUTDOWN);
- if (caph_rights_limit(fd, &rights) < 0) {
+ if (caph_rights_limit(fd, &rights) != 0) {
serrno = errno;
close(fd);
errno = serrno;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 16, 4:18 AM (11 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29753020
Default Alt Text
D45149.id138337.diff (1 KB)
Attached To
Mode
D45149: cat: Check for lack of success rather than a specific failure.
Attached
Detach File
Event Timeline
Log In to Comment