Skip to content

Commit 58e613a

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 50a21b7 commit 58e613a

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
@@ -109,7 +109,6 @@ load_env_vars(void)
109109
char *name = NULL;
110110
char *end = NULL;
111111
char *value = NULL;
112-
char *quote = NULL;
113112
char *comment = NULL;
114113

115114
// Strip leading and trailing whitespace
@@ -125,11 +124,10 @@ load_env_vars(void)
125124

126125
// Check whether value is quoted
127126
if ((*end == '\'') || (*end == '"')) {
128-
quote = end++;
129-
}
130-
value = end;
127+
const char *quote = *end++;
128+
129+
value = end;
131130

132-
if (quote != NULL) {
133131
/* Value is remaining characters up to next non-backslashed matching
134132
* quote character.
135133
*/

0 commit comments

Comments
 (0)