diff options
author | Gaurav Gupta <g.gupta@samsung.com> | 2014-07-26 21:14:53 +0800 |
---|---|---|
committer | Daniel Veillard <veillard@redhat.com> | 2014-07-26 21:14:53 +0800 |
commit | b8480ae781488f4e6974e24f2becb7bca01782f7 (patch) | |
tree | e31ba6396cc805ca44a58d63f1916d4612a6c97a | |
parent | 42870f46ccf36f83a55fde03344657d360ba0793 (diff) | |
download | libxml2-b8480ae781488f4e6974e24f2becb7bca01782f7.tar.gz |
Remove a couple of dead conditions
For https://bugzilla.gnome.org/show_bug.cgi?id=733711
-rw-r--r-- | xmlIO.c | 7 | ||||
-rw-r--r-- | xmlmemory.c | 5 |
2 files changed, 3 insertions, 9 deletions
@@ -887,7 +887,7 @@ xmlFileMatch (const char *filename ATTRIBUTE_UNUSED) { */ static void * xmlFileOpen_real (const char *filename) { - const char *path = NULL; + const char *path = filename; FILE *fd; if (filename == NULL) @@ -917,11 +917,8 @@ xmlFileOpen_real (const char *filename) { #else path = &filename[5]; #endif - } else - path = filename; + } - if (path == NULL) - return(NULL); if (!xmlCheckFilename(path)) return(NULL); diff --git a/xmlmemory.c b/xmlmemory.c index 37dcf3b4..05084e3d 100644 --- a/xmlmemory.c +++ b/xmlmemory.c @@ -512,10 +512,7 @@ xmlMemStrdupLoc(const char *str, const char *file, int line) if (xmlMemStopAtBlock == p->mh_number) xmlMallocBreakpoint(); - if (s != NULL) - strcpy(s,str); - else - goto error; + strcpy(s,str); TEST_POINT |