projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9aeaffd
)
reduce scope of variable. Found by PVS-Studio
author
Alan T. DeKok
<aland@freeradius.org>
Wed, 17 May 2017 16:15:07 +0000
(12:15 -0400)
committer
Alan T. DeKok
<aland@freeradius.org>
Fri, 19 May 2017 18:06:54 +0000
(14:06 -0400)
src/main/exec.c
patch
|
blob
|
history
diff --git
a/src/main/exec.c
b/src/main/exec.c
index
77fdd2e
..
d5b3a9a
100644
(file)
--- a/
src/main/exec.c
+++ b/
src/main/exec.c
@@
-86,7
+86,6
@@
pid_t radius_start_program(char const *cmd, REQUEST *request, bool exec_wait,
VALUE_PAIR *input_pairs, bool shell_escape)
{
#ifndef __MINGW32__
- char *p;
VALUE_PAIR *vp;
int n;
int to_child[2] = {-1, -1};
@@
-169,6
+168,8
@@
pid_t radius_start_program(char const *cmd, REQUEST *request, bool exec_wait,
*/
snprintf(buffer, sizeof(buffer), "%s=", vp->da->name);
if (shell_escape) {
+ char *p;
+
for (p = buffer; *p != '='; p++) {
if (*p == '-') {
*p = '_';