DragonFly BSD
DragonFly submit List (threaded) for 2004-07
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Clear warnings in bin/ed/cbc.c


From: Einar Karttunen <ekarttun@xxxxxxxxxxxxxx>
Date: 28 Jul 2004 14:51:05 +0300

Hello

Fixes warning about a cast in lvalue type, and 
removes spurious casts.

- Einar Karttunen

Index: cbc.c
===================================================================
RCS file: /home/e/cvs/src/bin/ed/cbc.c,v
retrieving revision 1.4
retrieving revision 1.4.40000.1
diff -u -r1.4 -r1.4.40000.1
--- cbc.c	19 Mar 2004 17:47:48 -0000	1.4
+++ cbc.c	28 Jul 2004 10:44:11 -0000	1.4.40000.1
@@ -96,7 +96,7 @@
 };
 int pflag;				/* 1 to preserve parity bits */
 
-char des_buf[8];		/* shared buffer for get_des_char/put_des_char */
+unsigned char des_buf[8];	/* shared buffer for get_des_char/put_des_char */
 int des_ct = 0;			/* count for get_des_char/put_des_char */
 int des_n = 0;			/* index for put_des_char/get_des_char */
 
@@ -129,7 +129,7 @@
 		des_n = 0;
 		des_ct = cbc_decode(des_buf, fp);
 	}
-	return (des_ct > 0) ? (unsigned char)des_buf[des_n++] : EOF;
+	return (des_ct > 0) ? des_buf[des_n++] : EOF;
 #else
 	return (getc(fp));
 #endif
@@ -145,7 +145,7 @@
 		des_ct = cbc_encode(des_buf, des_n, fp);
 		des_n = 0;
 	}
-	return (des_ct >= 0) ? ((unsigned char)des_buf[des_n++] = c) : EOF;
+	return (des_ct >= 0) ? (des_buf[des_n++] = c) : EOF;
 #else
 	return (fputc(c, fp));
 #endif


[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]