summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaurav Gupta <g.gupta@samsung.com>2014-07-26 21:14:53 +0800
committerDaniel Veillard <veillard@redhat.com>2014-07-26 21:14:53 +0800
commitb8480ae781488f4e6974e24f2becb7bca01782f7 (patch)
treee31ba6396cc805ca44a58d63f1916d4612a6c97a
parent42870f46ccf36f83a55fde03344657d360ba0793 (diff)
downloadlibxml2-b8480ae781488f4e6974e24f2becb7bca01782f7.tar.gz
Remove a couple of dead conditions
For https://bugzilla.gnome.org/show_bug.cgi?id=733711
-rw-r--r--xmlIO.c7
-rw-r--r--xmlmemory.c5
2 files changed, 3 insertions, 9 deletions
diff --git a/xmlIO.c b/xmlIO.c
index 5baeba33..c8258e51 100644
--- a/xmlIO.c
+++ b/xmlIO.c
@@ -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