Changeset f85409c in rtems


Ignore:
Timestamp:
Nov 22, 1999, 4:08:53 PM (21 years ago)
Author:
Jennifer Averett <Jennifer.Averett@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
0ca4fc8
Parents:
0ebf5694
Message:

+ Added checks for NULL and NULL string names (for sem_open & sem_unlink).

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/posix/src/semaphorenametoid.c

    r0ebf5694 rf85409c  
    3232  Objects_Name_to_id_errors  status;
    3333
     34   if ( !name )
     35     return EINVAL;
     36
     37  if ( !name[0] )
     38    return EINVAL;
     39
    3440  status = _Objects_Name_to_id(
    3541    &_POSIX_Semaphore_Information, (char *)name, 0, id );
     
    3844    return 0;
    3945
    40   return EINVAL;
     46  return ENOENT;
    4147}
    4248
  • cpukit/posix/src/semaphorenametoid.c

    r0ebf5694 rf85409c  
    3232  Objects_Name_to_id_errors  status;
    3333
     34   if ( !name )
     35     return EINVAL;
     36
     37  if ( !name[0] )
     38    return EINVAL;
     39
    3440  status = _Objects_Name_to_id(
    3541    &_POSIX_Semaphore_Information, (char *)name, 0, id );
     
    3844    return 0;
    3945
    40   return EINVAL;
     46  return ENOENT;
    4147}
    4248
Note: See TracChangeset for help on using the changeset viewer.