summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2001-02-21 10:56:06 +0000
committerJim Meyering <jim@meyering.net>2001-02-21 10:56:06 +0000
commit241297f40e620ead3f0cbebc2c4f3eb5127354e1 (patch)
tree2261863793cabf23fc30ac3269d51d80ff37004b /src
parentdf373089ee6c7951c0f6bba776b40233dfe01b24 (diff)
downloadcoreutils-241297f40e620ead3f0cbebc2c4f3eb5127354e1.tar.xz
(main): Remove assignment-in-if-expression.
In fact, remove t_errno altogether.
Diffstat (limited to 'src')
-rw-r--r--src/mkdir.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mkdir.c b/src/mkdir.c
index 3a92cfc4f..419bda75d 100644
--- a/src/mkdir.c
+++ b/src/mkdir.c
@@ -1,5 +1,5 @@
/* mkdir -- make directories
- Copyright (C) 90, 1995-2000 Free Software Foundation, Inc.
+ Copyright (C) 90, 1995-2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -162,19 +162,17 @@ main (int argc, char **argv)
{
const char *dir = argv[optind];
int dir_created;
- int t_errno;
fail = make_dir (dir, dir, newmode, &dir_created);
- t_errno = errno;
if (fail)
{
/* make_dir already gave a diagnostic. */
}
- else if (!create_parents && !dir_created && (t_errno = EEXIST))
+ else if (!create_parents && !dir_created)
{
/* make_dir `succeeds' when DIR already exists.
In that case, mkdir must fail, unless --parents (-p)
was specified. */
- error (0, t_errno, _("cannot create directory %s"),
+ error (0, EEXIST, _("cannot create directory %s"),
quote (dir));
fail = 1;
}