summaryrefslogtreecommitdiff
path: root/debianutils/mktemp.c
diff options
context:
space:
mode:
authorDenys Vlasenko2010-07-27 08:26:32 +0200
committerDenys Vlasenko2010-07-27 08:26:32 +0200
commit06702365d7faf47ebfc5b5453d73ade235ea4c65 (patch)
treea63b60615870d51cecd0d0008aa87c92f7a60f50 /debianutils/mktemp.c
parentb4d035165f9304e869ec2733ee6ded058c4c9270 (diff)
downloadbusybox-06702365d7faf47ebfc5b5453d73ade235ea4c65.zip
busybox-06702365d7faf47ebfc5b5453d73ade235ea4c65.tar.gz
mktemp: fix for dir/file.XXXXXX param (by Rob). +9 bytes.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'debianutils/mktemp.c')
-rw-r--r--debianutils/mktemp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/debianutils/mktemp.c b/debianutils/mktemp.c
index 2c4e196..7ce9f10 100644
--- a/debianutils/mktemp.c
+++ b/debianutils/mktemp.c
@@ -50,7 +50,7 @@ int mktemp_main(int argc UNUSED_PARAM, char **argv)
opts = getopt32(argv, "dqtp:", &path);
chp = argv[optind] ? argv[optind] : xstrdup("tmp.XXXXXX");
- if (chp[0] != '/' || (opts & 8))
+ if (!strchr(chp, '/') || (opts & 8))
chp = concat_path_file(path, chp);
if (opts & 1) { /* -d */