diff options
Diffstat (limited to 'src/libs/libgroff/tmpfile.cc')
-rw-r--r-- | src/libs/libgroff/tmpfile.cc | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/src/libs/libgroff/tmpfile.cc b/src/libs/libgroff/tmpfile.cc index d06a82bd..cf2bb8b1 100644 --- a/src/libs/libgroff/tmpfile.cc +++ b/src/libs/libgroff/tmpfile.cc @@ -103,14 +103,13 @@ static void remove_tmp_files() { struct xtmpfile_list *p = xtmpfiles_to_delete; - while (p) - { - if (unlink(p->fname) < 0) - error("cannot unlink `%1': %2", p->fname, strerror(errno)); - struct xtmpfile_list *old = p; - p = p->next; - free(old); - } + while (p) { + if (unlink(p->fname) < 0) + error("cannot unlink `%1': %2", p->fname, strerror(errno)); + struct xtmpfile_list *old = p; + p = p->next; + free(old); + } } static void add_tmp_file(const char *name) @@ -121,11 +120,10 @@ static void add_tmp_file(const char *name) struct xtmpfile_list *p = (struct xtmpfile_list *)malloc(sizeof(struct xtmpfile_list) + strlen (name)); - if (p == NULL) - { - error("cannot unlink `%1': %2", name, strerror(errno)); - return; - } + if (p == NULL) { + error("cannot unlink `%1': %2", name, strerror(errno)); + return; + } p->next = xtmpfiles_to_delete; strcpy(p->fname, name); xtmpfiles_to_delete = p; |