From 06702365d7faf47ebfc5b5453d73ade235ea4c65 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 27 Jul 2010 08:26:32 +0200 Subject: mktemp: fix for dir/file.XXXXXX param (by Rob). +9 bytes. Signed-off-by: Denys Vlasenko --- debianutils/mktemp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debianutils') diff --git a/debianutils/mktemp.c b/debianutils/mktemp.c index 2c4e19670..7ce9f1096 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 */ -- cgit v1.2.3