Skip to content

Commit

Permalink
MFH
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Esser committed Dec 24, 2002
1 parent 409f64d commit 00cc762
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ext/mime_magic/mime_magic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <hartmut@six.de> |
| Author: Hartmut Holzgraefe <hholzgra@php.net> |
+----------------------------------------------------------------------+
$Id$
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 00cc762

Please sign in to comment.