summaryrefslogtreecommitdiff
path: root/common/iomux.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/iomux.c')
-rw-r--r--common/iomux.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/common/iomux.c b/common/iomux.c
index 7b7b063cfc..7991235d11 100644
--- a/common/iomux.c
+++ b/common/iomux.c
@@ -45,15 +45,14 @@ int iomux_doenv(const int console, const char *arg)
i = 0;
temp = console_args;
for (;;) {
- temp = strchr(temp, ',');
- if (temp != NULL) {
- i++;
- temp++;
- continue;
- }
/* There's always one entry more than the number of commas. */
i++;
- break;
+
+ temp = strchr(temp, ',');
+ if (temp == NULL)
+ break;
+
+ temp++;
}
start = (char **)malloc(i * sizeof(char *));
if (start == NULL) {