Re: cvs: php4 /ext/mime_magic mime_magic.c
| From: | Andi Gutmans | Date: | Mon, 23 Dec 2002 21:17:15 +0000 |
| Subject: | Re: cvs: php4 /ext/mime_magic mime_magic.c | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-92797@lists.php.net to get a copy of this message | ||
At 08:50 AM 12/23/2002 +0000, Stefan Esser wrote:
This is very ugly and this kind of code is prone to error. Can't you cast the right side? Andisesser Mon Dec 23 03:50:06 2002 EDTModified files:/php4/ext/mime_magic mime_magic.cLog: fix compile error on IRIX Index: php4/ext/mime_magic/mime_magic.c diff -u php4/ext/mime_magic/mime_magic.c:1.19 php4/ext/mime_magic/mime_magic.c:1.20--- php4/ext/mime_magic/mime_magic.c:1.19 Mon Nov 25 07:30:24 2002 +++ php4/ext/mime_magic/mime_magic.c Mon Dec 23 03:50:05 2002@@ -15,7 +15,7 @@| Author: Hartmut Holzgraefe <hholzgra@php.net> |+----------------------------------------------------------------------+ - $Id: mime_magic.c,v 1.19 2002/11/25 12:30:24 hholzgra Exp $ + $Id: mime_magic.c,v 1.20 2002/12/23 08:50: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: @@ -358,7 +358,7 @@fname = conf->magicfile; /* todo cwd? */ f = fopen(fname, "rb"); if (f == NULL) { - (int) conf->magic = -1; + *(int *)&conf->magic = -1; return -1; }