Skip to content

Commit 5d24dd7

Browse files
committed
Fix pointer dereferencing.
1 parent d9a9410 commit 5d24dd7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/CayenneUtils/CayenneUtils.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ int getValueCount(size_t* count, char* payload, char token) {
206206
}
207207

208208
*count = 0;
209-
while (*index && index != '\0') {
209+
while (index && *index != '\0') {
210210
if ((*index == ',') || (*index == token)) {
211211
if (*index == ',') {
212212
if (countingValues) {
@@ -266,7 +266,7 @@ int parsePayload(CayenneValuePair* values, size_t* valuesSize, const char** type
266266
values[0].value = NULL;
267267
values[0].unit = NULL;
268268
*type = NULL;
269-
while (*index && index != '\0') {
269+
while (index && *index != '\0') {
270270
if ((*index == ',') || (*index == token)) {
271271
if (*index == ',') {
272272
*type = payload;

0 commit comments

Comments
 (0)