From: Stefan Esser Date: Tue, 24 Dec 2002 23:30:51 +0000 (+0000) Subject: MFH X-Git-Tag: php-4.3.0~21 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=00cc7629345ee432032d3c0c66b560b68c4a41b8;p=php MFH --- diff --git a/ext/mime_magic/mime_magic.c b/ext/mime_magic/mime_magic.c index d0ed717f88..84b21a10a5 100644 --- a/ext/mime_magic/mime_magic.c +++ b/ext/mime_magic/mime_magic.c @@ -12,7 +12,7 @@ | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ - | Author: Hartmut Holzgraefe | + | Author: Hartmut Holzgraefe | +----------------------------------------------------------------------+ $Id$ @@ -274,7 +274,7 @@ PHP_MINIT_FUNCTION(mime_magic) 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 @@ PHP_FUNCTION(mime_content_type) 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 @@ static int apprentice(void) fname = conf->magicfile; /* todo cwd? */ f = fopen(fname, "rb"); if (f == NULL) { - *(int *)&conf->magic = -1; + conf->magic = (struct magic *)-1; return -1; }