Browse Source

fs: add consistent flag fall throughs

stringToFlags() has fall throughs in a case statement.
However, they are not consistently implemented. This commit adds
consistency.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
archived-io.js-v0.10
Colin Ihrig 11 years ago
committed by Trevor Norris
parent
commit
8ee9f04de6
  1. 6
      lib/fs.js

6
lib/fs.js

@ -374,9 +374,11 @@ function stringToFlags(flag) {
switch (flag) {
case 'r' : return O_RDONLY;
case 'rs' : return O_RDONLY | O_SYNC;
case 'rs' : // fall through
case 'sr' : return O_RDONLY | O_SYNC;
case 'r+' : return O_RDWR;
case 'rs+' : return O_RDWR | O_SYNC;
case 'rs+' : // fall through
case 'sr+' : return O_RDWR | O_SYNC;
case 'w' : return O_TRUNC | O_CREAT | O_WRONLY;
case 'wx' : // fall through

Loading…
Cancel
Save