mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 08:26:27 +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
cc2de01684
commit
ca3e96799a
2 changed files with 13 additions and 2 deletions
|
@ -527,10 +527,17 @@ extern "C" {
|
|||
@interface GSXMLRPC : NSObject <NSURLHandleClient>
|
||||
{
|
||||
@private
|
||||
#if defined(GNUSTEP)
|
||||
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;
|
||||
NSURLConnection *connection;
|
||||
NSMutableData *response;
|
||||
#endif
|
||||
NSTimer *timer;
|
||||
id result;
|
||||
id delegate; // Not retained.
|
||||
|
|
|
@ -148,8 +148,12 @@ static BOOL cacheDone = NO;
|
|||
|
||||
static char * xml_strdup(const char *from)
|
||||
{
|
||||
unsigned len = (from == 0) ? 1 : (strlen(from) + 1);
|
||||
char *to = malloc(len);
|
||||
unsigned len;
|
||||
char *to;
|
||||
|
||||
if (0 == from) from = "";
|
||||
len = strlen(from) + 1;
|
||||
to = malloc(len);
|
||||
memcpy(to, from, len);
|
||||
return to;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue