Changeset 19b74f31 in rtems


Ignore:
Timestamp:
Nov 2, 1999, 4:25:05 PM (20 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
a504ced3
Parents:
3fb2a8d
Message:

Check for NULL being passed in.

Files:
12 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/libcsupport/src/readdir.c

    r3fb2a8d r19b74f31  
    5757  register struct dirent *dp;
    5858 
     59  if ( !dirp )
     60    return NULL;
     61
    5962  for (;;) {
    6063    if (dirp->dd_loc == 0) {
  • c/src/exec/libcsupport/src/rewinddir.c

    r3fb2a8d r19b74f31  
    2525  off_t status;
    2626
     27  if ( !dirp )
     28    return;
     29
    2730  status = lseek( dirp->dd_fd, 0, SEEK_SET );
    2831 
  • c/src/exec/libcsupport/src/seekdir.c

    r3fb2a8d r19b74f31  
    2626  off_t status;
    2727
     28  if ( !dirp )
     29    return;
     30
    2831  status = lseek( dirp->dd_fd, loc, SEEK_SET );
    2932
     
    3134   * This is not a nice way to error out, but we have no choice here.
    3235   */
    33   if( status == -1 )
     36
     37  if ( status == -1 )
    3438    return;
    3539
  • c/src/exec/libcsupport/src/telldir.c

    r3fb2a8d r19b74f31  
    1717#include <stdlib.h>
    1818#include <unistd.h>
     19#include <errno.h>
    1920
    2021#include "libio_.h"
     
    2728  rtems_libio_t  *iop;
    2829
     30  if ( !dirp )
     31    set_errno_and_return_minus_one( EBADF );
     32
    2933  /*
    30    *  Get the file control block structure associated with the file descriptor
     34   *  Get the file control block structure associated with the
     35   *  file descriptor
    3136   */
    3237
  • c/src/lib/libc/readdir.c

    r3fb2a8d r19b74f31  
    5757  register struct dirent *dp;
    5858 
     59  if ( !dirp )
     60    return NULL;
     61
    5962  for (;;) {
    6063    if (dirp->dd_loc == 0) {
  • c/src/lib/libc/rewinddir.c

    r3fb2a8d r19b74f31  
    2525  off_t status;
    2626
     27  if ( !dirp )
     28    return;
     29
    2730  status = lseek( dirp->dd_fd, 0, SEEK_SET );
    2831 
  • c/src/lib/libc/seekdir.c

    r3fb2a8d r19b74f31  
    2626  off_t status;
    2727
     28  if ( !dirp )
     29    return;
     30
    2831  status = lseek( dirp->dd_fd, loc, SEEK_SET );
    2932
     
    3134   * This is not a nice way to error out, but we have no choice here.
    3235   */
    33   if( status == -1 )
     36
     37  if ( status == -1 )
    3438    return;
    3539
  • c/src/lib/libc/telldir.c

    r3fb2a8d r19b74f31  
    1717#include <stdlib.h>
    1818#include <unistd.h>
     19#include <errno.h>
    1920
    2021#include "libio_.h"
     
    2728  rtems_libio_t  *iop;
    2829
     30  if ( !dirp )
     31    set_errno_and_return_minus_one( EBADF );
     32
    2933  /*
    30    *  Get the file control block structure associated with the file descriptor
     34   *  Get the file control block structure associated with the
     35   *  file descriptor
    3136   */
    3237
  • cpukit/libcsupport/src/readdir.c

    r3fb2a8d r19b74f31  
    5757  register struct dirent *dp;
    5858 
     59  if ( !dirp )
     60    return NULL;
     61
    5962  for (;;) {
    6063    if (dirp->dd_loc == 0) {
  • cpukit/libcsupport/src/rewinddir.c

    r3fb2a8d r19b74f31  
    2525  off_t status;
    2626
     27  if ( !dirp )
     28    return;
     29
    2730  status = lseek( dirp->dd_fd, 0, SEEK_SET );
    2831 
  • cpukit/libcsupport/src/seekdir.c

    r3fb2a8d r19b74f31  
    2626  off_t status;
    2727
     28  if ( !dirp )
     29    return;
     30
    2831  status = lseek( dirp->dd_fd, loc, SEEK_SET );
    2932
     
    3134   * This is not a nice way to error out, but we have no choice here.
    3235   */
    33   if( status == -1 )
     36
     37  if ( status == -1 )
    3438    return;
    3539
  • cpukit/libcsupport/src/telldir.c

    r3fb2a8d r19b74f31  
    1717#include <stdlib.h>
    1818#include <unistd.h>
     19#include <errno.h>
    1920
    2021#include "libio_.h"
     
    2728  rtems_libio_t  *iop;
    2829
     30  if ( !dirp )
     31    set_errno_and_return_minus_one( EBADF );
     32
    2933  /*
    30    *  Get the file control block structure associated with the file descriptor
     34   *  Get the file control block structure associated with the
     35   *  file descriptor
    3136   */
    3237
Note: See TracChangeset for help on using the changeset viewer.