sesser Tue Dec 24 18:28:05 2002 EDT Modified files: /php4/ext/mime_magic mime_magic.c Log: do correct casting Index: php4/ext/mime_magic/mime_magic.c diff -u php4/ext/mime_magic/mime_magic.c:1.20 php4/ext/mime_magic/mime_magic.c:1.21 --- php4/ext/mime_magic/mime_magic.c:1.20 Mon Dec 23 03:50:05 2002 +++ php4/ext/mime_magic/mime_magic.c Tue Dec 24 18:28:05 2002 @@ -15,7 +15,7 @@ | Author: Hartmut Holzgraefe <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ - $Id: mime_magic.c,v 1.20 2002/12/23 08:50:05 sesser Exp $ + $Id: mime_magic.c,v 1.21 2002/12/24 23:28:05 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