diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-11-02 16:25:05 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-11-02 16:25:05 +0000 |
commit | 19b74f3175705f923fed1c83a13a3a731c5e0de7 (patch) | |
tree | 859e11851cac98cd932d55888103030b923666ed /c/src/exec/libcsupport/src/seekdir.c | |
parent | Fixed typo where memfile_handlers set twice and directory_handlers (diff) | |
download | rtems-19b74f3175705f923fed1c83a13a3a731c5e0de7.tar.bz2 |
Check for NULL being passed in.
Diffstat (limited to 'c/src/exec/libcsupport/src/seekdir.c')
-rw-r--r-- | c/src/exec/libcsupport/src/seekdir.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/c/src/exec/libcsupport/src/seekdir.c b/c/src/exec/libcsupport/src/seekdir.c index 374ca7b5aa..5a2f3bb469 100644 --- a/c/src/exec/libcsupport/src/seekdir.c +++ b/c/src/exec/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; |