From 63d2d195416051d2d4ceb0d5b16673dd3eb74ef9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?P=C3=A1draig=20Brady?=
Date: Wed, 11 Feb 2015 02:46:28 +0000 Subject: [PATCH] maint: various whitespace cleanups in tempname Recent changes to the tempname module, introduced whitespace inconsistencies that are triggering issues in coreutils diffs generated against the new files. * lib/tempname.c: Normalize spacing and line length. * lib/tempname.h: Likewise. * modules/tempname: Likewise. --- ChangeLog | 7 +++++++ lib/tempname.c | 7 ++++--- lib/tempname.h | 4 ++-- modules/tempname | 2 +- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 20139087fc..f4de4fec89 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2015-02-11 Pádraig Brady
+ + maint: various whitespace cleanups in tempname + * lib/tempname.c: Normalize spacing and line length. + * lib/tempname.h: Likewise. + * modules/tempname: Likewise. + 2015-02-11 Pádraig Brady
tests: provide returns_() to simplify exit status checking diff --git a/lib/tempname.c b/lib/tempname.c index fa8b01899f..49c7df1d1b 100644 --- a/lib/tempname.c +++ b/lib/tempname.c @@ -178,7 +178,8 @@ static const char letters[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; int -__try_tempname (char *tmpl, int suffixlen, void *args, int (*try) (char *, void *)) +__try_tempname (char *tmpl, int suffixlen, void *args, + int (*try) (char *, void *)) { int len; char *XXXXXX; @@ -263,8 +264,8 @@ try_file (char *tmpl, void *flags) { int *openflags = flags; return __open (tmpl, - (*openflags & ~O_ACCMODE) - | O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); + (*openflags & ~O_ACCMODE) + | O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); } static int diff --git a/lib/tempname.h b/lib/tempname.h index f7c98d052b..0df4381c6c 100644 --- a/lib/tempname.h +++ b/lib/tempname.h @@ -51,7 +51,7 @@ extern int gen_tempname (char *tmpl, int suffixlen, int flags, int kind); name to try. If TRY returns a non-negative number, TRY_GEN_TEMPNAME returns with this value. Otherwise, if errno is set to EEXIST, another name is tried, or else TRY_GEN_TEMPNAME returns -1. */ -extern int try_tempname(char *tmpl, int suffixlen, void *args, - int (*try) (char *, void *)); +extern int try_tempname (char *tmpl, int suffixlen, void *args, + int (*try) (char *, void *)); #endif /* GL_TEMPNAME_H */ diff --git a/modules/tempname b/modules/tempname index c589d708ec..3767bf9acc 100644 --- a/modules/tempname +++ b/modules/tempname @@ -1,5 +1,5 @@ Description: -gen_tempname() and try_tempname() functions: create a private temporary file or directory. +gen_tempname() and try_tempname(): create a private temporary file or directory. Files: lib/tempname.c -- 2.39.5