mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-02-05 13:38:33 +00:00
Sonar fixes for eve. (#501)
This commit is contained in:
parent
87a0718ca0
commit
4e48624cdf
12
src/eve.cc
12
src/eve.cc
@ -21,7 +21,6 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "eve.h"
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -31,6 +30,7 @@
|
|||||||
#include <utime.h>
|
#include <utime.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
#include "eve.h"
|
||||||
#include "logging.h"
|
#include "logging.h"
|
||||||
#include "text_object.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) {
|
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;
|
xmlNodePtr n;
|
||||||
xmlDocPtr doc = 0;
|
xmlDocPtr doc = 0;
|
||||||
xmlNodePtr root = 0;
|
xmlNodePtr root = 0;
|
||||||
@ -183,9 +187,7 @@ static char *getXmlFromAPI(const char *apiKeyID, const char *apiVCode,
|
|||||||
|
|
||||||
rc = curl_easy_perform(curl_handle);
|
rc = curl_easy_perform(curl_handle);
|
||||||
|
|
||||||
if (chr.data == nullptr) {
|
if (chr.data == nullptr) { return nullptr; }
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
content = strdup(chr.data);
|
content = strdup(chr.data);
|
||||||
curl_easy_cleanup(curl_handle);
|
curl_easy_cleanup(curl_handle);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user