summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/seekdir.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-02 16:25:05 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-02 16:25:05 +0000
commit19b74f3175705f923fed1c83a13a3a731c5e0de7 (patch)
tree859e11851cac98cd932d55888103030b923666ed /cpukit/libcsupport/src/seekdir.c
parentFixed typo where memfile_handlers set twice and directory_handlers (diff)
downloadrtems-19b74f3175705f923fed1c83a13a3a731c5e0de7.tar.bz2
Check for NULL being passed in.
Diffstat (limited to 'cpukit/libcsupport/src/seekdir.c')
-rw-r--r--cpukit/libcsupport/src/seekdir.c6
1 files changed, 5 insertions, 1 deletions
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;