This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
mkdir() mode is unsigned.
authorJarkko Hietaniemi <jhi@iki.fi>
Thu, 25 Jun 2015 01:25:44 +0000 (21:25 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Sat, 27 Jun 2015 03:09:47 +0000 (23:09 -0400)
Coverity CID 104787.

Of course we could join the new millennium and use mode_t.

pp_sys.c

index 4f337f0..85aa1b6 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -3904,7 +3904,7 @@ PP(pp_mkdir)
     STRLEN len;
     const char *tmps;
     bool copy = FALSE;
-    const int mode = (MAXARG > 1 && (TOPs||((void)POPs,0))) ? POPi : 0777;
+    const unsigned int mode = (MAXARG > 1 && (TOPs||((void)POPs,0))) ? POPu : 0777;
 
     TRIMSLASHES(tmps,len,copy);