From c0a3642981b441d255e9b866ab783b62bedc6c57 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 19 Mar 1999 22:59:20 +0000 Subject: A cleanup patch on fcntl.c from Eric Norum for 2 lines of code that did not get included when Joel tried to manually add a rejected patch. --- c/src/exec/libcsupport/src/fcntl.c | 2 ++ c/src/lib/libc/fcntl.c | 2 ++ cpukit/libcsupport/src/fcntl.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/c/src/exec/libcsupport/src/fcntl.c b/c/src/exec/libcsupport/src/fcntl.c index 3a65a74574..9b89711fcc 100644 --- a/c/src/exec/libcsupport/src/fcntl.c +++ b/c/src/exec/libcsupport/src/fcntl.c @@ -126,6 +126,8 @@ int fcntl( break; default: + errno = EINVAL; + ret = -1; break; } if ((ret >= 0) && iop->handlers->fcntl) { diff --git a/c/src/lib/libc/fcntl.c b/c/src/lib/libc/fcntl.c index 3a65a74574..9b89711fcc 100644 --- a/c/src/lib/libc/fcntl.c +++ b/c/src/lib/libc/fcntl.c @@ -126,6 +126,8 @@ int fcntl( break; default: + errno = EINVAL; + ret = -1; break; } if ((ret >= 0) && iop->handlers->fcntl) { diff --git a/cpukit/libcsupport/src/fcntl.c b/cpukit/libcsupport/src/fcntl.c index 3a65a74574..9b89711fcc 100644 --- a/cpukit/libcsupport/src/fcntl.c +++ b/cpukit/libcsupport/src/fcntl.c @@ -126,6 +126,8 @@ int fcntl( break; default: + errno = EINVAL; + ret = -1; break; } if ((ret >= 0) && iop->handlers->fcntl) { -- cgit v1.2.3