summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/activeharmony/fix_logical_bug_in_slave_list_parsing.patch
blob: 08141143d9207a44ce3fdd94caefcf47d9fff5f9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
diff --git a/code-server/code_generator.cxx b/code-server/code_generator.cxx
index df25400..1c213f7 100644
--- a/code-server/code_generator.cxx
+++ b/code-server/code_generator.cxx
@@ -574,13 +574,13 @@ int parse_slave_list(const char* hostlist)
         }
 
         // Skip leading whitespace.
-        while (head < tail && (head == '\0' || isspace(*head))) {
+        while (head < tail && (*head == '\0' || isspace(*head))) {
             ++head;
         }
         host_ptr = head;
 
         // Find host boundary whitespace.
-        while (head < tail && (head != '\0' && !isspace(*head))) {
+        while (head < tail && (*head != '\0' && !isspace(*head))) {
             ++head;
         }
         host = string(host_ptr, head++);
@@ -596,7 +596,7 @@ int parse_slave_list(const char* hostlist)
         }
 
         // Skip trailing whitespace.
-        while (head < tail && (head == '\0' || isspace(*head))) {
+        while (head < tail && (*head == '\0' || isspace(*head))) {
             ++head;
         }