]> granicus.if.org Git - file/commitdiff
do the actual cast in c; although I don't like it because it can hide bugs,
authorChristos Zoulas <christos@zoulas.com>
Wed, 15 Jul 2009 15:16:52 +0000 (15:16 +0000)
committerChristos Zoulas <christos@zoulas.com>
Wed, 15 Jul 2009 15:16:52 +0000 (15:16 +0000)
there is one case in compress.c for a void * where it matters. Perhaps I will
revert it some other time.

src/file.h

index ca25aed4a8e6f35e7eb035cc59125c7b7c3c7b22..936becab1e31d091419bfdba74b9faa9bdb456ea 100644 (file)
@@ -27,7 +27,7 @@
  */
 /*
  * file.h - definitions for file(1) program
- * @(#)$File: file.h,v 1.121 2009/05/08 23:25:46 christos Exp $
+ * @(#)$File: file.h,v 1.122 2009/07/15 15:16:52 christos Exp $
  */
 
 #ifndef __file_h__
@@ -301,7 +301,7 @@ struct mlist {
 #ifdef __cplusplus
 #define CAST(T, b)     static_cast<T>(b)
 #else
-#define CAST(T, b)     (b)
+#define CAST(T, b)     (T)(b)
 #endif
 
 struct level_info {