summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-10-02 15:30:32 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-10-02 15:30:32 +0800
commit84b8ebed3ba8fc14837f18d805cdac512990a5b8 (patch)
tree608739b917acaca18cd2735194aaf2101a72567a
parent126c3af0abf3876fb27ee76c8ba92d1e1a54eedd (diff)
They will be initialised earlier
-rw-r--r--ticket.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/ticket.c b/ticket.c
index 0bf145f..a239fa7 100644
--- a/ticket.c
+++ b/ticket.c
@@ -177,9 +177,6 @@ static size_t history_l_handler(void *contents, size_t size, size_t nmemb
else if (!strcmp(token, "Status"))
ticket_history->type
= RTCLIENT_TICKET_HISTORY_TYPE_STATUS;
- else
- ticket_history->type
- = RTCLIENT_TICKET_HISTORY_TYPE_UNKNOWN;
} else if (!strcmp(token, "Field")) {
token = strtok_r(NULL, ":", &tokensaveptr);
if (!strcmp(++token, "Priority"))
@@ -191,9 +188,6 @@ static size_t history_l_handler(void *contents, size_t size, size_t nmemb
else if (!strcmp(token, "Owner"))
ticket_history->field
= RTCLIENT_TICKET_HISTORY_FIELD_OWNER;
- else
- ticket_history->field
- = RTCLIENT_TICKET_HISTORY_FIELD_NONE;
} else if (!strcmp(token, "OldValue")) {
token = strtok_r(NULL, ":", &tokensaveptr);
if (token && strcmp(token, "")) {
@@ -201,8 +195,7 @@ static size_t history_l_handler(void *contents, size_t size, size_t nmemb
= malloc(strlen(token));
strcpy(ticket_history->old_value
, ++token);
- } else
- ticket_history->old_value = NULL;
+ }
} else if (!strcmp(token, "NewValue")) {
token = strtok_r(NULL, ":", &tokensaveptr);
if (token && strcmp(token, "")) {
@@ -210,8 +203,7 @@ static size_t history_l_handler(void *contents, size_t size, size_t nmemb
= malloc(strlen(token));
strcpy(ticket_history->new_value
, ++token);
- } else
- ticket_history->new_value = NULL;
+ }
} else if (!strcmp(token, "Data")) {
token = strtok_r(NULL, ":", &tokensaveptr);
if (token && strcmp(token, "")) {
@@ -219,8 +211,7 @@ static size_t history_l_handler(void *contents, size_t size, size_t nmemb
= malloc(strlen(token));
strcpy(ticket_history->data
, ++token);
- } else
- ticket_history->data = NULL;
+ }
} else if (!strcmp(token, "Description")) {
token = strtok_r(NULL, ":", &tokensaveptr);
ticket_history->description