mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 09:02:01 +00:00
minor cleanup for static analyser
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32514 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0d5c7cb77c
commit
b918c226f7
2 changed files with 13 additions and 2 deletions
|
@ -527,10 +527,17 @@ extern "C" {
|
||||||
@interface GSXMLRPC : NSObject <NSURLHandleClient>
|
@interface GSXMLRPC : NSObject <NSURLHandleClient>
|
||||||
{
|
{
|
||||||
@private
|
@private
|
||||||
|
#if defined(GNUSTEP)
|
||||||
NSURLHandle *handle;
|
NSURLHandle *handle;
|
||||||
|
NSString *connectionURL GS_UNUSED_IVAR;
|
||||||
|
NSURLConnection *connection GS_UNUSED_IVAR;
|
||||||
|
NSMutableData *response GS_UNUSED_IVAR;
|
||||||
|
#else
|
||||||
|
id handle GS_UNUSED_IVAR;
|
||||||
NSString *connectionURL;
|
NSString *connectionURL;
|
||||||
NSURLConnection *connection;
|
NSURLConnection *connection;
|
||||||
NSMutableData *response;
|
NSMutableData *response;
|
||||||
|
#endif
|
||||||
NSTimer *timer;
|
NSTimer *timer;
|
||||||
id result;
|
id result;
|
||||||
id delegate; // Not retained.
|
id delegate; // Not retained.
|
||||||
|
|
|
@ -148,8 +148,12 @@ static BOOL cacheDone = NO;
|
||||||
|
|
||||||
static char * xml_strdup(const char *from)
|
static char * xml_strdup(const char *from)
|
||||||
{
|
{
|
||||||
unsigned len = (from == 0) ? 1 : (strlen(from) + 1);
|
unsigned len;
|
||||||
char *to = malloc(len);
|
char *to;
|
||||||
|
|
||||||
|
if (0 == from) from = "";
|
||||||
|
len = strlen(from) + 1;
|
||||||
|
to = malloc(len);
|
||||||
memcpy(to, from, len);
|
memcpy(to, from, len);
|
||||||
return to;
|
return to;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue