diff options
author | Stefan Esser <sesser@php.net> | 2002-12-24 23:28:05 +0000 |
---|---|---|
committer | Stefan Esser <sesser@php.net> | 2002-12-24 23:28:05 +0000 |
commit | e900f8c97bf0b7ee4aa77f3e98b87c8d13891709 (patch) | |
tree | ab5a48da28a1529eaab001abd1020c9acfacba1a /ext | |
parent | 2e6e0f87dc059d721d12c174412f024b9cd3281a (diff) | |
download | php-git-e900f8c97bf0b7ee4aa77f3e98b87c8d13891709.tar.gz |
do correct casting
Diffstat (limited to 'ext')
-rw-r--r-- | ext/mime_magic/mime_magic.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/mime_magic/mime_magic.c b/ext/mime_magic/mime_magic.c index 86c650c699..84b21a10a5 100644 --- a/ext/mime_magic/mime_magic.c +++ b/ext/mime_magic/mime_magic.c @@ -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; } |