From 8ee9f04de6dfa89fc8fb96628b343d861c60bb2e Mon Sep 17 00:00:00 2001 From: Colin Ihrig Date: Thu, 8 May 2014 22:26:26 -0400 Subject: [PATCH] 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 --- lib/fs.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/fs.js b/lib/fs.js index b61a1f5..cdcc13d 100644 --- a/lib/fs.js +++ b/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 -- 2.7.4