Changeset 31e8f1b in rtems for cpukit


Ignore:
Timestamp:
Mar 14, 2019, 7:25:18 PM (5 weeks ago)
Author:
Joel Sherrill <joel@…>
Branches:
master
Children:
9e48958
Parents:
c319945
Message:

shmopen.c: Fix logically unreachable code (Coverity ID: 1399706, 1399714)

Closes #3694.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/posix/src/shmopen.c

    rc319945 r31e8f1b  
    196196{
    197197  int flags;
    198   if ( oflag & O_RDONLY ) {
     198
     199  if ( (oflag & O_ACCMODE) == O_RDONLY ) {
    199200    flags = RTEMS_FS_PERMS_READ;
    200201  } else {
     
    287288
    288289  flags = LIBIO_FLAGS_CLOSE_ON_EXEC;
    289   if ( oflag & O_RDONLY ) {
     290  if ( (oflag & O_ACCMODE) == O_RDONLY ) {
    290291    flags |= LIBIO_FLAGS_READ;
    291292  } else {
Note: See TracChangeset for help on using the changeset viewer.