about summary refs log tree commit diff stats
path: root/b64f.c
diff options
context:
space:
mode:
authorFulton Browne <git@fulton.software>2021-05-15 21:16:20 +0000
committerFulton Browne <git@fulton.software>2021-05-15 21:16:20 +0000
commita7354ac7c6e4ddcf36e3d60851c98caa4e2d7dc1 (patch)
treed886bc906c3d3b5797fc62e694cb3b76fa0add73 /b64f.c
parent2e82773e3f043ce07469425225185fb17def312c (diff)
downloadbase64-a7354ac7c6e4ddcf36e3d60851c98caa4e2d7dc1.tar.gz
added plan9 encode
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. */