From 4e48624cdfa933f3167f3cc6b0fb03661d7edba4 Mon Sep 17 00:00:00 2001 From: Brenden Matthews Date: Sun, 13 May 2018 13:56:52 -0400 Subject: [PATCH] Sonar fixes for eve. (#501) --- src/eve.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/eve.cc b/src/eve.cc index a7fbb080..8a6d5537 100644 --- a/src/eve.cc +++ b/src/eve.cc @@ -21,7 +21,6 @@ * */ -#include "eve.h" #include #include #include @@ -31,6 +30,7 @@ #include #include #include "config.h" +#include "eve.h" #include "logging.h" #include "text_object.h" @@ -96,7 +96,11 @@ static size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream) { } int parseTrainingXml(char *data, Character *s) { - char *skill, *level, *ends, *cache, *isTraining; + char *skill = "0"; + char *level = "0"; + char *ends = ""; + char *cache = ""; + char *isTraining = "0"; xmlNodePtr n; xmlDocPtr doc = 0; xmlNodePtr root = 0; @@ -183,9 +187,7 @@ static char *getXmlFromAPI(const char *apiKeyID, const char *apiVCode, rc = curl_easy_perform(curl_handle); - if (chr.data == nullptr) { - return nullptr; - } + if (chr.data == nullptr) { return nullptr; } content = strdup(chr.data); curl_easy_cleanup(curl_handle);