Skip to content

Commit d064663

Browse files
author
Ivan Zhakov
committed
Follow-up to r1929716: Move variable declaration at the beginning of scope to
support C89. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1929717 13f79535-47bb-0310-9956-ffa450edef68
1 parent 0b0a7ee commit d064663

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

threadproc/win32/proc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
603603
|| strcasecmp(progname + i - 4, ".cmd") == 0))
604604
{
605605
const char *argv0;
606+
char *shellcmd;
606607

607608
if (has_space(progname)) {
608609
argv0 = apr_pstrcat(pool, "\"", progname, "\"", NULL);
@@ -611,7 +612,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
611612
argv0 = progname;
612613
}
613614

614-
char *shellcmd = getenv("COMSPEC");
615+
shellcmd = getenv("COMSPEC");
615616
if (!shellcmd) {
616617
if (attr->errfn) {
617618
attr->errfn(pool, APR_EINVAL, "COMSPEC envar is not set");

0 commit comments

Comments
 (0)