Page MenuHomeFreeBSD

D38038.diff
No OneTemporary

D38038.diff

diff --git a/contrib/tzcode/zic.c b/contrib/tzcode/zic.c
--- a/contrib/tzcode/zic.c
+++ b/contrib/tzcode/zic.c
@@ -661,7 +661,7 @@
name ? name : "", name ? ": " : "",
e);
if (tempname)
- remove(tempname);
+ (void)remove(tempname);
exit(EXIT_FAILURE);
}
}
@@ -1418,7 +1418,7 @@
if (tempname) {
if (rename(tempname, name) != 0) {
int rename_errno = errno;
- remove(tempname);
+ (void)remove(tempname);
fprintf(stderr, _("%s: rename to %s/%s: %s\n"),
progname, directory, name, strerror(rename_errno));
exit(EXIT_FAILURE);
@@ -3933,6 +3933,14 @@
static void
mkdirs(char const *argname, bool ancestors)
{
+ /*
+ * If -D was specified, do not create directories. A subsequent
+ * file operation will fail and produce an appropriate error
+ * message.
+ */
+ if (Dflag)
+ return;
+
char *name = estrdup(argname);
char *cp = name;
@@ -3943,13 +3951,6 @@
it can use slashes to separate the already-existing
ancestor prefix from the to-be-created subdirectories. */
- /*
- * If -D was specified, do not create directories. A subsequent
- * file operation will fail and produce an appropriate error
- * message.
- */
- if (Dflag)
- return;
/* Do not mkdir a root directory, as it must exist. */
while (*cp == '/')
cp++;

File Metadata

Mime Type
text/plain
Expires
Thu, May 1, 5:15 AM (21 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17873490
Default Alt Text
D38038.diff (1 KB)

Event Timeline