Skip to content

Commit 7c879bb

Browse files
committed
Refactor: remoted: Limit quote scope in load_env_vars()
It's no longer needed outside this block. Signed-off-by: Reid Wahl <[email protected]>
1 parent 5bc947c commit 7c879bb

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

daemons/execd/remoted_pidone.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ load_env_vars(void)
101101
char *name = NULL;
102102
char *end = NULL;
103103
char *value = NULL;
104-
char *quote = NULL;
105104
char *comment = NULL;
106105

107106
// Strip leading and trailing whitespace
@@ -119,11 +118,10 @@ load_env_vars(void)
119118

120119
// Check whether value is quoted
121120
if ((*end == '\'') || (*end == '"')) {
122-
quote = end++;
123-
}
124-
value = end;
121+
const char *quote = *end++;
122+
123+
value = end;
125124

126-
if (quote != NULL) {
127125
/* Value is remaining characters up to next non-backslashed matching
128126
* quote character.
129127
*/

0 commit comments

Comments
 (0)