diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2002-10-14 11:15:18 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2002-10-14 11:15:18 +0000 |
commit | 819d5cb84d8cf91432f76b43612b710e91c19d11 (patch) | |
tree | da79bea09777b0ce2e70eeba02fc579db41878ba /xmlIO.c | |
parent | 6045c90aefe11086aaf504415811f97f87e6f967 (diff) | |
download | android_external_libxml2-819d5cb84d8cf91432f76b43612b710e91c19d11.tar.gz android_external_libxml2-819d5cb84d8cf91432f76b43612b710e91c19d11.tar.bz2 android_external_libxml2-819d5cb84d8cf91432f76b43612b710e91c19d11.zip |
Christian Glahn found a small bug in the push parser. cleaned up and made
* parser.c: Christian Glahn found a small bug in the push parser.
* xmlIO.c include/libxml/xmlIO.h: cleaned up and made xmlCheckFilename
public
Daniel
Diffstat (limited to 'xmlIO.c')
-rw-r--r-- | xmlIO.c | 15 |
1 files changed, 6 insertions, 9 deletions
@@ -261,25 +261,22 @@ xmlCleanupOutputCallbacks(void) * returns 1. if stat fails, returns 0 (if calling * stat on the filename fails, it can't be right). * if stat succeeds and the file is a directory, - * sets errno to EISDIR and returns 0. otherwise - * returns 1. + * returns 2. otherwise returns 1. */ -static int +int xmlCheckFilename (const char *path) { #ifdef HAVE_STAT -#ifdef S_ISDIR struct stat stat_buffer; if (stat(path, &stat_buffer) == -1) return 0; +#ifdef S_ISDIR if (S_ISDIR(stat_buffer.st_mode)) { - errno = EISDIR; - return 0; + return 2; } - #endif #endif return 1; @@ -992,7 +989,7 @@ static void xmlFreeHTTPWriteCtxt( xmlIOHTTPWriteCtxtPtr ctxt ) { if ( ctxt->uri != NULL ) - free( ctxt->uri ); + xmlFree( ctxt->uri ); if ( ctxt->doc_buff != NULL ) { @@ -1007,7 +1004,7 @@ xmlFreeHTTPWriteCtxt( xmlIOHTTPWriteCtxtPtr ctxt ) } } - free( ctxt ); + xmlFree( ctxt ); return; } |