[libxml2] Remove a couple of dead conditions
- From: Daniel Veillard <veillard src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Remove a couple of dead conditions
- Date: Sat, 26 Jul 2014 20:42:45 +0000 (UTC)
commit b8480ae781488f4e6974e24f2becb7bca01782f7
Author: Gaurav Gupta <g gupta samsung com>
Date: Sat Jul 26 21:14:53 2014 +0800
Remove a couple of dead conditions
For https://bugzilla.gnome.org/show_bug.cgi?id=733711
xmlIO.c | 7 ++-----
xmlmemory.c | 5 +----
2 files changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/xmlIO.c b/xmlIO.c
index 5baeba3..c8258e5 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 37dcf3b..05084e3 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]