Browse code

Tighten types

git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@1597 77e5149b-7576-45b1-b177-96237e5ba77b

Nigel Horne authored on 2005/06/01 21:58:44
Showing 1 changed files
... ...
@@ -15,7 +15,7 @@
15 15
  *  along with this program; if not, write to the Free Software
16 16
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 17
  */
18
-static	char	const	rcsid[] = "$Id: pdf.c,v 1.22 2005/05/27 14:44:00 nigelhorne Exp $";
18
+static	char	const	rcsid[] = "$Id: pdf.c,v 1.23 2005/06/01 12:58:44 nigelhorne Exp $";
19 19
 
20 20
 #if HAVE_CONFIG_H
21 21
 #include "clamav-config.h"
... ...
@@ -374,10 +374,10 @@ ascii85decode(const char *buf, size_t len, unsigned char *output)
374 374
 		if(byte >= '!' && byte <= 'u') {
375 375
 			sum = sum * 85 + ((uint32_t)byte - '!');
376 376
 			if(++quintet == 5) {
377
-				*output++ = sum >> 24;
378
-				*output++ = (sum >> 16) & 0xFF;
379
-				*output++ = (sum >> 8) & 0xFF;
380
-				*output++ = sum & 0xFF;
377
+				*output++ = (unsigned char)(sum >> 24);
378
+				*output++ = (unsigned char)((sum >> 16) & 0xFF);
379
+				*output++ = (unsigned char)((sum >> 8) & 0xFF);
380
+				*output++ = (unsigned char)(sum & 0xFF);
381 381
 				ret += 4;
382 382
 				quintet = 0;
383 383
 				sum = 0;
... ...
@@ -405,7 +405,7 @@ ascii85decode(const char *buf, size_t len, unsigned char *output)
405 405
 					sum += (0xFFFFFF >> ((quintet - 2) * 8));
406 406
 				ret += quintet;
407 407
 				for(i = 0; i < quintet - 1; i++)
408
-					*output++ = (sum >> (24 - 8 * i)) & 0xFF;
408
+					*output++ = (unsigned char)((sum >> (24 - 8 * i)) & 0xFF);
409 409
 				quintet = 0;
410 410
 			}
411 411
 			len = 0;
... ...
@@ -438,7 +438,8 @@ pdf_nextlinestart(const char *ptr, size_t len)
438 438
 }
439 439
 
440 440
 /*
441
- * Return the next PDF token. This assumes that we're not in a stream
441
+ * Return the start of the next PDF token.
442
+ * This assumes that we're not in a stream.
442 443
  */
443 444
 static const char *
444 445
 pdf_nexttoken(const char *ptr, size_t len)