cvs: php-src(PHP_5_3) /ext/standard uuencode.c
| From: | Kalle Sommer Nielsen | Date: | Wed, 13 May 2009 16:29:26 +0000 |
| Subject: | cvs: php-src(PHP_5_3) /ext/standard uuencode.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-57776@lists.php.net to get a copy of this message | ||
kalle Wed May 13 16:29:26 2009 UTC
Modified files: (Branch: PHP_5_3)
/php-src/ext/standard uuencode.c
Log:
MFH: Fix compiler warnings, safe_emalloc expects size_t, not double as ceil returns
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/uuencode.c?r1=1.5.2.1.2.4.2.3&r2=1.5.2.1.2.4.2.4&diff_format=u
Index: php-src/ext/standard/uuencode.c
diff -u php-src/ext/standard/uuencode.c:1.5.2.1.2.4.2.3
php-src/ext/standard/uuencode.c:1.5.2.1.2.4.2.4
--- php-src/ext/standard/uuencode.c:1.5.2.1.2.4.2.3 Wed Dec 31 11:15:46 2008
+++ php-src/ext/standard/uuencode.c Wed May 13 16:29:26 2009
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: uuencode.c,v 1.5.2.1.2.4.2.3 2008/12/31 11:15:46 sebastian Exp $ */
+/* $Id: uuencode.c,v 1.5.2.1.2.4.2.4 2009/05/13 16:29:26 kalle Exp $ */
/*
* Portions of this code are based on Berkeley's uuencode/uudecode
@@ -71,7 +71,7 @@
char *p, *s, *e, *ee;
/* encoded length is ~ 38% greater then the original */
- p = *dest = safe_emalloc(ceil(src_len * 1.38), 1, 46);
+ p = *dest = safe_emalloc((size_t) ceil(src_len * 1.38), 1, 46);
s = src;
e = src + src_len;
@@ -129,7 +129,7 @@
int len, total_len=0;
char *s, *e, *p, *ee;
- p = *dest = safe_emalloc(ceil(src_len * 0.75), 1, 1);
+ p = *dest = safe_emalloc((size_t) ceil(src_len * 0.75), 1, 1);
s = src;
e = src + src_len;