about summary refs log tree commit diff
path: root/show.c
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-07-18 16:52:11 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-07-18 16:52:11 +0200
commitf03343c5e68f5e0935b82404da266c35874c7c65 (patch)
treeb4f51ed86a037d082afac375a1fdb7a02f22f833 /show.c
parent6710fd9cd5e548c490d61716f9f268c9bef9f3f4 (diff)
downloadmblaze-f03343c5e68f5e0935b82404da266c35874c7c65.tar.gz
mblaze-f03343c5e68f5e0935b82404da266c35874c7c65.tar.xz
mblaze-f03343c5e68f5e0935b82404da266c35874c7c65.zip
show: normalize fwrite calls
Diffstat (limited to 'show.c')
-rw-r--r--show.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/show.c b/show.c
index 3426acb..5fd93e3 100644
--- a/show.c
+++ b/show.c
@@ -156,7 +156,7 @@ render_mime(int depth, char *ct, char *body, size_t bodylen)
 			perror("popen");
 			goto nofilter;
 		}
-		fwrite(body, bodylen, 1, p);
+		fwrite(body, 1, bodylen, p);
 		if (pclose(p) != 0) {
 			perror("pclose");
 			goto nofilter;
@@ -174,7 +174,7 @@ nofilter:
 			    strcasecmp(charset, "utf-8") == 0 ||
 			    strcasecmp(charset, "utf8") == 0 ||
 			    strcasecmp(charset, "us-ascii") == 0)
-				fwrite(body, bodylen, 1, stdout);
+				fwrite(body, 1, bodylen, stdout);
 			else
 				print_u8recode(body, bodylen, charset);
 			free(charset);
@@ -295,7 +295,7 @@ extract_mime(int depth, char *ct, char *body, size_t bodylen)
 
 	if (extract_argc == 0) {
 		if (extract_stdout) { // output all parts
-			fwrite(body, bodylen, 1, stdout);
+			fwrite(body, 1, bodylen, stdout);
 		} else { // extract all named attachments
 			if (filename) {
 				printf("%s\n", filename);
@@ -312,7 +312,7 @@ extract_mime(int depth, char *ct, char *body, size_t bodylen)
 			if (errno == 0 && !*b && d == mimecount) {
 				// extract by id
 				if (extract_stdout) {
-					fwrite(body, bodylen, 1, stdout);
+					fwrite(body, 1, bodylen, stdout);
 				} else {
 					char buf[255];
 					if (!filename) {
@@ -326,7 +326,7 @@ extract_mime(int depth, char *ct, char *body, size_t bodylen)
 			} else if (filename && strcmp(a, filename) == 0) {
 				// extract by name
 				if (extract_stdout) {
-					fwrite(body, bodylen, 1, stdout);
+					fwrite(body, 1, bodylen, stdout);
 				} else {
 					printf("%s\n", filename);
 					writefile(filename, body, bodylen);
@@ -386,7 +386,7 @@ show(char *file)
 		if (fd == -1)
 			return;
 		hl = read(fd, header, hl);
-		fwrite(header, hl, 1, stdout);
+		fwrite(header, 1, hl, stdout);
 	} else if (Lflag) {  // all headers
 		char *h = 0;
 		while ((h = blaze822_next_header(msg, h))) {
@@ -421,7 +421,7 @@ show(char *file)
 	printf("\n");
 
 	if (rflag || !blaze822_check_mime(msg)) {  // raw body
-		fwrite(blaze822_body(msg), blaze822_bodylen(msg), 1, stdout);
+		fwrite(blaze822_body(msg), 1, blaze822_bodylen(msg), stdout);
 		goto done;
 	}