sesser Tue Dec 24 18:30:52 2002 EDT Modified files: (Branch: PHP_4_3) /php4/ext/mime_magic mime_magic.c Log: MFH Index: php4/ext/mime_magic/mime_magic.c diff -u php4/ext/mime_magic/mime_magic.c:1.13.2.5 php4/ext/mime_magic/mime_magic.c:1.13.2.6 --- php4/ext/mime_magic/mime_magic.c:1.13.2.5 Mon Dec 23 03:51:16 2002 +++ php4/ext/mime_magic/mime_magic.c Tue Dec 24 18:30:51 2002 @@ -12,10 +12,10 @@ | obtain it through the world-wide-web, please send a note to | | [EMAIL PROTECTED] so we can mail you a copy immediately. | +----------------------------------------------------------------------+ - | Author: Hartmut Holzgraefe <[EMAIL PROTECTED]> | + | Author: Hartmut Holzgraefe <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ - $Id: mime_magic.c,v 1.13.2.5 2002/12/23 08:51:16 sesser Exp $ + $Id: mime_magic.c,v 1.13.2.6 2002/12/24 23:30:51 sesser Exp $ This module contains a lot of stuff taken from Apache mod_mime_magic, so the license section is a little bit longer than usual: @@ -274,7 +274,7 @@ PHP_MSHUTDOWN_FUNCTION(mime_magic) { UNREGISTER_INI_ENTRIES(); - if (mime_global.magic != NULL && (int)mime_global.magic != -1) { + if (mime_global.magic != NULL && mime_global.magic != (struct magic *) -1) { struct magic *iter = mime_global.magic; while (iter != NULL) { struct magic *iter_next = iter->next; @@ -312,7 +312,7 @@ return; } - if ((int) conf->magic == -1) { + if (conf->magic == (struct magic *)-1) { php_error(E_ERROR, MODNAME " could not be initialized, magic file %s is not avaliable", conf->magicfile); RETURN_FALSE; } @@ -358,7 +358,7 @@ fname = conf->magicfile; /* todo cwd? */ f = fopen(fname, "rb"); if (f == NULL) { - *(int *)&conf->magic = -1; + conf->magic = (struct magic *)-1; return -1; }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php