Added lots of "(void)" casts to standard function calls.
[exim.git] / src / src / mime.c
index bece458c0ac8d30433ad760ede25154ddd986906..52c92ca85f7a4f1c5e4a538ebc85a3895d8c5c20 100644 (file)
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/mime.c,v 1.5 2005/03/08 15:32:02 tom Exp $ */
+/* $Cambridge: exim/src/src/mime.c,v 1.8 2005/06/27 14:29:43 ph10 Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
@@ -116,7 +116,7 @@ uschar *mime_decode_qp_char(uschar *qp_p,int *c) {
 
 
 uschar *mime_parse_line(uschar *buffer, uschar *data, uschar *encoding, int *num_decoded) {
+
   if (encoding == NULL) {
     /* no encoding type at all */
     NO_DECODING:
@@ -384,7 +384,7 @@ int mime_decode(uschar **listptr) {
 
   }
 
-  fclose(decode_file);
+  (void)fclose(decode_file);
 
   clearerr(mime_stream);
   fseek(mime_stream,f_pos,SEEK_SET);
@@ -418,7 +418,7 @@ int mime_get_header(FILE *f, uschar *header) {
         c = fgetc(f);
         if (c == EOF) break;
         if ( (c == '\t') || (c == ' ') ) continue;
-        ungetc(c,f);
+        (void)ungetc(c,f);
       };
       /* end of the header, terminate with ';' */
       c = ';';
@@ -502,8 +502,8 @@ int mime_get_header(FILE *f, uschar *header) {
 }
 
 
-int mime_acl_check(FILE *f, struct mime_boundary_context *context, uschar
-                   **user_msgptr, uschar **log_msgptr) {
+int mime_acl_check(uschar *acl, FILE *f, struct mime_boundary_context *context,
+                   uschar **user_msgptr, uschar **log_msgptr) {
   int rc = OK;
   uschar *header = NULL;
   struct mime_boundary_context nested_context;
@@ -512,7 +512,7 @@ int mime_acl_check(FILE *f, struct mime_boundary_context *context, uschar
   header = (uschar *)malloc(MIME_MAX_HEADER_SIZE+1);
   if (header == NULL) {
     log_write(0, LOG_PANIC,
-                 "acl_smtp_mime: can't allocate %d bytes of memory.", MIME_MAX_HEADER_SIZE+1);
+                 "MIME ACL: can't allocate %d bytes of memory.", MIME_MAX_HEADER_SIZE+1);
     return DEFER;
   };
 
@@ -659,7 +659,7 @@ int mime_acl_check(FILE *f, struct mime_boundary_context *context, uschar
     mime_is_coverletter = !(context && context->context == MBC_ATTACHMENT);
 
     /* call ACL handling function */
-    rc = acl_check(ACL_WHERE_MIME, NULL, acl_smtp_mime, user_msgptr, log_msgptr);
+    rc = acl_check(ACL_WHERE_MIME, NULL, acl, user_msgptr, log_msgptr);
 
     mime_stream = NULL;
     mime_current_boundary = NULL;
@@ -680,7 +680,7 @@ int mime_acl_check(FILE *f, struct mime_boundary_context *context, uschar
       else
         nested_context.context = MBC_COVERLETTER_ONESHOT;
 
-      rc = mime_acl_check(f, &nested_context, user_msgptr, log_msgptr);
+      rc = mime_acl_check(acl, f, &nested_context, user_msgptr, log_msgptr);
       if (rc != OK) break;
     }
     else if ( (mime_content_type != NULL) &&