This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
In S_validate_suid(), move declarations after the first statement.
[perl5.git] / perl.c
diff --git a/perl.c b/perl.c
index b238d04..5518675 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -3752,13 +3752,13 @@ S_open_script(pTHX_ const char *scriptname, bool dosearch,
 STATIC void
 S_validate_suid(pTHX_ PerlIO *rsfp)
 {
 STATIC void
 S_validate_suid(pTHX_ PerlIO *rsfp)
 {
-    PERL_ARGS_ASSERT_VALIDATE_SUID;
-
     const UV  my_uid = PerlProc_getuid();
     const UV my_euid = PerlProc_geteuid();
     const UV  my_gid = PerlProc_getgid();
     const UV my_egid = PerlProc_getegid();
 
     const UV  my_uid = PerlProc_getuid();
     const UV my_euid = PerlProc_geteuid();
     const UV  my_gid = PerlProc_getgid();
     const UV my_egid = PerlProc_getegid();
 
+    PERL_ARGS_ASSERT_VALIDATE_SUID;
+
     if (my_euid != my_uid || my_egid != my_gid) {      /* (suidperl doesn't exist, in fact) */
        dVAR;
 
     if (my_euid != my_uid || my_egid != my_gid) {      /* (suidperl doesn't exist, in fact) */
        dVAR;