summaryrefslogtreecommitdiff
path: root/util/libreboot-utils
diff options
context:
space:
mode:
Diffstat (limited to 'util/libreboot-utils')
-rw-r--r--util/libreboot-utils/lib/mkhtemp.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/util/libreboot-utils/lib/mkhtemp.c b/util/libreboot-utils/lib/mkhtemp.c
index 377ec206..3d9a9f6e 100644
--- a/util/libreboot-utils/lib/mkhtemp.c
+++ b/util/libreboot-utils/lib/mkhtemp.c
@@ -79,8 +79,8 @@ new_tmp_common(int *fd, char **path, int type,
#endif
struct stat st;
- const char *suffix;
- size_t suffix_len;
+ const char *templatestr;
+ size_t templatestr_len;
size_t dirlen;
size_t destlen;
@@ -144,17 +144,17 @@ new_tmp_common(int *fd, char **path, int type,
goto err;
if (template != NULL)
- suffix = template;
+ templatestr = template;
else
- suffix = "tmp.XXXXXXXXXX";
+ templatestr = "tmp.XXXXXXXXXX";
- if (slen(suffix, maxlen, &suffix_len) < 0)
+ if (slen(templatestr, maxlen, &templatestr_len) < 0)
goto err;
/* sizeof adds an extra byte, useful
* because we also want '.' or '/'
*/
- destlen = dirlen + 1 + suffix_len;
+ destlen = dirlen + 1 + templatestr_len;
if (destlen > maxlen - 1) {
errno = EOVERFLOW;
goto err;
@@ -168,7 +168,7 @@ new_tmp_common(int *fd, char **path, int type,
memcpy(dest, tmpdir, dirlen);
*(dest + dirlen) = '/';
- memcpy(dest + dirlen + 1, suffix, suffix_len);
+ memcpy(dest + dirlen + 1, templatestr, templatestr_len);
*(dest + destlen) = '\0';
fname = dest + dirlen + 1;
@@ -622,7 +622,7 @@ mkhtemp(int *fd,
if((fname_copy = malloc(fname_len + 1)) == NULL)
goto err;
- /* fname_copy = suffix region only; p points to trailing XXXXXX */
+ /* fname_copy = templatestr region only; p points to trailing XXXXXX */
memcpy(fname_copy,
template + len - fname_len,
fname_len + 1);