From 19b74f3175705f923fed1c83a13a3a731c5e0de7 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 2 Nov 1999 16:25:05 +0000 Subject: Check for NULL being passed in. --- cpukit/libcsupport/src/seekdir.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cpukit/libcsupport/src/seekdir.c') diff --git a/cpukit/libcsupport/src/seekdir.c b/cpukit/libcsupport/src/seekdir.c index 374ca7b5aa..5a2f3bb469 100644 --- a/cpukit/libcsupport/src/seekdir.c +++ b/cpukit/libcsupport/src/seekdir.c @@ -25,12 +25,16 @@ void seekdir( { off_t status; + if ( !dirp ) + return; + status = lseek( dirp->dd_fd, loc, SEEK_SET ); /* * This is not a nice way to error out, but we have no choice here. */ - if( status == -1 ) + + if ( status == -1 ) return; dirp->dd_loc = 0; -- cgit v1.2.3