summaryrefslogtreecommitdiff
blob: 6584f0ea8b3320368a2382c3f4d8c3c3c7be41c4 (plain)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
--- a/src/lib/Libattr/req.cpp	2017-01-24 18:35:27.000000000 -0500
+++ b/src/lib/Libattr/req.cpp	2017-11-21 13:40:27.201964749 -0500
@@ -1037,17 +1037,17 @@
     error = "Bad tasks value: '";
     error += submission_str;
     error += "'";
     return(PBSE_BAD_PARAMETER);
     }
 
   if (*current == ':')
     current++;
-  else if (current != '\0')
+  else if (*current != '\0')
     {
     error = "Invalid task specification";
     return(PBSE_BAD_PARAMETER);
     }
 
   while ((current != NULL) && 
          (*current != '\0'))
     {
--- a/src/cmds/qsub_functions.c	2017-01-24 18:35:27.000000000 -0500
+++ b/src/cmds/qsub_functions.c	2017-11-21 13:40:27.201964749 -0500
@@ -900,7 +900,7 @@
   else
     {
     char *tmp_host = pbs_default();
-    if (tmp_host == '\0')
+    if (*tmp_host == '\0')
       hash_add_or_exit(job_attr, ATTR_pbs_o_server, qsub_host, LOGIC_DATA);
     else
       hash_add_or_exit(job_attr, ATTR_pbs_o_server, tmp_host, LOGIC_DATA);
--- a/src/cmds/pbsnodes.c 2017-01-24 18:35:27.000000000 -0500
+++ b/src/cmds/pbsnodes.c 2017-11-21 13:40:27.201964749 -0500
@@ -900,7 +900,7 @@
         {
         nodeargs = (char **)calloc(2, sizeof(char *));
         nodeargs[0] = strdup("");
-        nodeargs[1] = '\0';
+        nodeargs[1] = NULL;
         }
       }
     }
@@ -1020,7 +1020,7 @@
 
         MXMLCreateE(&DE, "Data");
 
-        for (lindex = 0;nodeargs[lindex] != '\0';lindex++)
+        for (lindex = 0;nodeargs[lindex] != NULL;lindex++)
           {
           bstatus = statnode(con, nodeargs[lindex]);
 
@@ -1041,7 +1041,7 @@
         }
       else
         {
-        for (lindex = 0;nodeargs[lindex] != '\0';lindex++)
+        for (lindex = 0;nodeargs[lindex] != NULL;lindex++)
           {
           bstatus = statnode(con, nodeargs[lindex]);
 
@@ -1065,7 +1065,7 @@
 
       /* list any node that is DOWN, OFFLINE, or UNKNOWN */
 
-      for (lindex = 0;nodeargs[lindex] != '\0';lindex++)
+      for (lindex = 0;nodeargs[lindex] != NULL;lindex++)
         {
         bstatus = statnode(con, nodeargs[lindex]);