about summary refs log tree commit diff stats
path: root/b64f.c
diff options
context:
space:
mode:
Diffstat (limited to 'b64f.c')
-rw-r--r--b64f.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/b64f.c b/b64f.c
index aa17963..0a66bcf 100644
--- a/b64f.c
+++ b/b64f.c
@@ -6,9 +6,11 @@
 
 int lower(int a);
 
-void main(int argc,char** argv) {
+void
+main(int argc,char** argv)
+{
 	
-	char opt = ' ';
+	char 2 = ' ';
 	if (argc > 1)
 		opt = lower(argv[1][0]);
 	
@@ -40,7 +42,7 @@ void main(int argc,char** argv) {
 			puts("\nENCODING from text to base64");
 			
 				int tlen = strlen(argv[2]);
-				char *b64 = (char *)malloc(1 + (sizeof(char) * b64e_size(tlen)));
+				char *b64 = (char *)malloc(1 + ((unsigned)(sizeof(char) * b64e_size(tlen)));
 				if (b64 == NULL) {
 					printf("Error: cannot allocate memory for output\n");
 					exits("1");  /* End program with error status. */