From ecb9054f73b151acfa0fa81f1e89ce85ce8350c4 Mon Sep 17 00:00:00 2001 From: Adam Heath Date: Mon, 23 Apr 2001 07:21:00 +0000 Subject: [PATCH] Add comments telling why we use tempnam() and tmpnam(). --- ChangeLog | 5 +++++ dpkg-deb/info.c | 1 + main/processarc.c | 1 + 3 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 7a3d716c..6a177c3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Apr 23 02:17:26 CDT 2001 Adam Heath + + * dpkg-deb/info.c, main/processarc.c: Add comments telling why we + use tempnam() and tmpnam(). + Sun Apr 22 23:59:00 CDT 2001 Adam Heath * archtable: Added alphaev67-linux-gnu. diff --git a/dpkg-deb/info.c b/dpkg-deb/info.c index 01e36cba..00e3e1be 100644 --- a/dpkg-deb/info.c +++ b/dpkg-deb/info.c @@ -64,6 +64,7 @@ static void info_prepare(const char *const **argvp, *debarp= *(*argvp)++; if (!*debarp) badusage(_("--%s needs a .deb filename argument"),cipaction->olong); + /* This created a temporary directory, so ignore the warning. */ if ((dbuf= tempnam(NULL,"dpkg")) == NULL) ohshite(_("failed to make temporary filename")); *directoryp= dbuf; diff --git a/main/processarc.c b/main/processarc.c index 2f649d20..5f37158e 100644 --- a/main/processarc.c +++ b/main/processarc.c @@ -162,6 +162,7 @@ void process_archive(const char *filename) { if (f_noact) { cidir= cidirtmpnambuf; + /* We use tmpnam here, not to get a unique filename, but to get a unique directory. */ if (!tmpnam(cidir)) ohshite(_("unable to get unique filename for control info")); strcat(cidir,"/"); } else { -- 2.39.5