| Index: fusl/src/temp/mktemp.c
|
| diff --git a/fusl/src/temp/mktemp.c b/fusl/src/temp/mktemp.c
|
| index 4ab0df2069ac6d0c685ea2265f15d40596392217..dea45e593783a85247f2bf2ae95c53cd7c935794 100644
|
| --- a/fusl/src/temp/mktemp.c
|
| +++ b/fusl/src/temp/mktemp.c
|
| @@ -4,29 +4,29 @@
|
| #include <errno.h>
|
| #include <sys/stat.h>
|
|
|
| -char *__randname(char *);
|
| +char* __randname(char*);
|
|
|
| -char *mktemp(char *template)
|
| -{
|
| - size_t l = strlen(template);
|
| - int retries = 100;
|
| - struct stat st;
|
| +char* mktemp(char* template) {
|
| + size_t l = strlen(template);
|
| + int retries = 100;
|
| + struct stat st;
|
|
|
| - if (l < 6 || memcmp(template+l-6, "XXXXXX", 6)) {
|
| - errno = EINVAL;
|
| - *template = 0;
|
| - return template;
|
| - }
|
| + if (l < 6 || memcmp(template + l - 6, "XXXXXX", 6)) {
|
| + errno = EINVAL;
|
| + *template = 0;
|
| + return template;
|
| + }
|
|
|
| - do {
|
| - __randname(template+l-6);
|
| - if (stat(template, &st)) {
|
| - if (errno != ENOENT) *template = 0;
|
| - return template;
|
| - }
|
| - } while (--retries);
|
| + do {
|
| + __randname(template + l - 6);
|
| + if (stat(template, &st)) {
|
| + if (errno != ENOENT)
|
| + *template = 0;
|
| + return template;
|
| + }
|
| + } while (--retries);
|
|
|
| - *template = 0;
|
| - errno = EEXIST;
|
| - return template;
|
| + *template = 0;
|
| + errno = EEXIST;
|
| + return template;
|
| }
|
|
|