git://git.exim.org
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed -DBIND_8_COMPAT from OS/Makefile-Darwin on the advice of Mac OS
[exim.git]
/
src
/
src
/
transports
/
appendfile.c
diff --git
a/src/src/transports/appendfile.c
b/src/src/transports/appendfile.c
index b17eb3b39518b2662a26fcff77b5e5378c8053ca..d336ada040c997a60777a3587c1592d7d5b45d43 100644
(file)
--- a/
src/src/transports/appendfile.c
+++ b/
src/src/transports/appendfile.c
@@
-1,10
+1,10
@@
-/* $Cambridge: exim/src/src/transports/appendfile.c,v 1.
8 2005/06/16 14:10:14
ph10 Exp $ */
+/* $Cambridge: exim/src/src/transports/appendfile.c,v 1.
11 2006/02/07 11:19:02
ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
*************************************************/
/*************************************************
* Exim - an Internet mail transport agent *
*************************************************/
-/* Copyright (c) University of Cambridge 1995 - 200
5
*/
+/* Copyright (c) University of Cambridge 1995 - 200
6
*/
/* See the file NOTICE for conditions of use and distribution. */
/* See the file NOTICE for conditions of use and distribution. */
@@
-602,7
+602,7
@@
for (h = &host; h != NULL; h = h->next)
(void)ip_connect(sock, host_af, h->address, ntohs(sp->s_port), 0);
rc = send(sock, buffer, Ustrlen(buffer) + 1, 0);
(void)ip_connect(sock, host_af, h->address, ntohs(sp->s_port), 0);
rc = send(sock, buffer, Ustrlen(buffer) + 1, 0);
- close(sock);
+
(void)
close(sock);
if (rc >= 0) break;
DEBUG(D_transport)
if (rc >= 0) break;
DEBUG(D_transport)
@@
-1430,7
+1430,7
@@
if (!isdirectory)
if (cfd >= 0)
{
transport_instance *tt = check_file_format(cfd, tblock, addr);
if (cfd >= 0)
{
transport_instance *tt = check_file_format(cfd, tblock, addr);
- close(cfd);
+
(void)
close(cfd);
/* If another transport is indicated, call it and return; if no transport
was found, just return - the error data will have been set up.*/
/* If another transport is indicated, call it and return; if no transport
was found, just return - the error data will have been set up.*/
@@
-1622,7
+1622,7
@@
if (!isdirectory)
sufficiently worried. */
if ((rc = Ulink(hitchname, lockname)) != 0) fstat(hd, &statbuf);
sufficiently worried. */
if ((rc = Ulink(hitchname, lockname)) != 0) fstat(hd, &statbuf);
- close(hd);
+
(void)
close(hd);
Uunlink(hitchname);
if (rc != 0 && statbuf.st_nlink != 2)
{
Uunlink(hitchname);
if (rc != 0 && statbuf.st_nlink != 2)
{
@@
-1734,8
+1734,8
@@
if (!isdirectory)
/* We have successfully created and opened the file. Ensure that the group
and the mode are correct. */
/* We have successfully created and opened the file. Ensure that the group
and the mode are correct. */
- Uchown(filename, uid, gid);
- Uchmod(filename, mode);
+
(void)
Uchown(filename, uid, gid);
+
(void)
Uchmod(filename, mode);
}
}
@@
-2002,7
+2002,7
@@
if (!isdirectory)
goto RETURN;
}
goto RETURN;
}
- Uchmod(mbx_lockname, 0600);
+
(void)
Uchmod(mbx_lockname, 0600);
if (apply_lock(mbx_lockfd, F_WRLCK, ob->use_fcntl,
ob->lock_fcntl_timeout, ob->use_flock, ob->lock_flock_timeout) >= 0)
if (apply_lock(mbx_lockfd, F_WRLCK, ob->use_fcntl,
ob->lock_fcntl_timeout, ob->use_flock, ob->lock_flock_timeout) >= 0)
@@
-2023,7
+2023,7
@@
if (!isdirectory)
DEBUG(D_transport) debug_printf("failed to lock %s: %s\n", mbx_lockname,
strerror(errno));
DEBUG(D_transport) debug_printf("failed to lock %s: %s\n", mbx_lockname,
strerror(errno));
- close(mbx_lockfd);
+
(void)
close(mbx_lockfd);
mbx_lockfd = -1;
}
else
mbx_lockfd = -1;
}
else
@@
-2039,7
+2039,7
@@
if (!isdirectory)
DEBUG(D_transport)
debug_printf("fcntl(), flock(), or MBX locking failed - retrying\n");
DEBUG(D_transport)
debug_printf("fcntl(), flock(), or MBX locking failed - retrying\n");
- close(fd);
+
(void)
close(fd);
fd = -1;
use_lstat = TRUE; /* Reset to use lstat first */
fd = -1;
use_lstat = TRUE; /* Reset to use lstat first */
@@
-2415,8
+2415,8
@@
else
/* Why are these here? Put in because they are present in the non-maildir
directory case above. */
/* Why are these here? Put in because they are present in the non-maildir
directory case above. */
- Uchown(filename, uid, gid);
- Uchmod(filename, mode);
+
(void)
Uchown(filename, uid, gid);
+
(void)
Uchmod(filename, mode);
}
#endif /* SUPPORT_MAILDIR */
}
#endif /* SUPPORT_MAILDIR */
@@
-2457,8
+2457,8
@@
else
/* Why are these here? Put in because they are present in the non-maildir
directory case above. */
/* Why are these here? Put in because they are present in the non-maildir
directory case above. */
- Uchown(filename, uid, gid);
- Uchmod(filename, mode);
+
(void)
Uchown(filename, uid, gid);
+
(void)
Uchmod(filename, mode);
/* Built a C stream from the open file descriptor. */
/* Built a C stream from the open file descriptor. */
@@
-2468,7
+2468,7
@@
else
addr->transport_return = PANIC;
addr->message = string_sprintf("fdopen of %s ("
"for %s transport) failed", filename, tblock->name);
addr->transport_return = PANIC;
addr->message = string_sprintf("fdopen of %s ("
"for %s transport) failed", filename, tblock->name);
- close(fd);
+
(void)
close(fd);
Uunlink(filename);
return FALSE;
}
Uunlink(filename);
return FALSE;
}
@@
-2486,7
+2486,7
@@
else
addr->message = string_sprintf("Expansion of \"%s\" (mailstore "
"prefix for %s transport) failed: %s", ob->mailstore_prefix,
tblock->name, expand_string_message);
addr->message = string_sprintf("Expansion of \"%s\" (mailstore "
"prefix for %s transport) failed: %s", ob->mailstore_prefix,
tblock->name, expand_string_message);
- fclose(env_file);
+
(void)
fclose(env_file);
Uunlink(filename);
return FALSE;
}
Uunlink(filename);
return FALSE;
}
@@
-2515,7
+2515,7
@@
else
addr->message = string_sprintf("Expansion of \"%s\" (mailstore "
"suffix for %s transport) failed: %s", ob->mailstore_suffix,
tblock->name, expand_string_message);
addr->message = string_sprintf("Expansion of \"%s\" (mailstore "
"suffix for %s transport) failed: %s", ob->mailstore_suffix,
tblock->name, expand_string_message);
- fclose(env_file);
+
(void)
fclose(env_file);
Uunlink(filename);
return FALSE;
}
Uunlink(filename);
return FALSE;
}
@@
-2549,8
+2549,8
@@
else
Uunlink(filename);
return FALSE;
}
Uunlink(filename);
return FALSE;
}
- Uchown(dataname, uid, gid);
- Uchmod(dataname, mode);
+
(void)
Uchown(dataname, uid, gid);
+
(void)
Uchmod(dataname, mode);
}
#endif /* SUPPORT_MAILSTORE */
}
#endif /* SUPPORT_MAILSTORE */
@@
-2559,8
+2559,8
@@
else
/* In all cases of writing to a new file, ensure that the file which is
going to be renamed has the correct ownership and mode. */
/* In all cases of writing to a new file, ensure that the file which is
going to be renamed has the correct ownership and mode. */
- Uchown(filename, uid, gid);
- Uchmod(filename, mode);
+
(void)
Uchown(filename, uid, gid);
+
(void)
Uchmod(filename, mode);
}
}
@@
-2732,7
+2732,7
@@
if (temp_file != NULL && ob->mbx_format)
/* Preserve errno while closing the temporary file. */
mbx_save_errno = errno;
/* Preserve errno while closing the temporary file. */
mbx_save_errno = errno;
- fclose(temp_file);
+
(void)
fclose(temp_file);
errno = mbx_save_errno;
}
#endif /* SUPPORT_MBX */
errno = mbx_save_errno;
}
#endif /* SUPPORT_MBX */
@@
-2755,7
+2755,7
@@
if (yield == OK && maildirsize_fd >= 0)
maildir_record_length(maildirsize_fd, message_size);
maildir_save_errno = errno; /* Preserve errno while closing the file */
maildir_record_length(maildirsize_fd, message_size);
maildir_save_errno = errno; /* Preserve errno while closing the file */
-close(maildirsize_fd);
+
(void)
close(maildirsize_fd);
errno = maildir_save_errno;
#endif /* SUPPORT_MAILDIR */
errno = maildir_save_errno;
#endif /* SUPPORT_MAILDIR */
@@
-2919,7
+2919,7
@@
if (yield != OK)
investigated so far have ftruncate(), whereas not all have the F_FREESP
fcntl() call (BSDI & FreeBSD do not). */
investigated so far have ftruncate(), whereas not all have the F_FREESP
fcntl() call (BSDI & FreeBSD do not). */
- if (!isdirectory) ftruncate(fd, saved_size);
+ if (!isdirectory)
(void)
ftruncate(fd, saved_size);
}
/* Handle successful writing - we want the modification time to be now for
}
/* Handle successful writing - we want the modification time to be now for
@@
-3130,7
+3130,7
@@
if (mbx_lockfd >= 0)
debug_printf("unlinking MBX lock file %s\n", mbx_lockname);
Uunlink(mbx_lockname);
}
debug_printf("unlinking MBX lock file %s\n", mbx_lockname);
Uunlink(mbx_lockname);
}
- close(mbx_lockfd);
+
(void)
close(mbx_lockfd);
}
#endif /* SUPPORT_MBX */
}
#endif /* SUPPORT_MBX */