summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2022-01-01 01:24:27 +0000
committerColin Watson <cjwatson@debian.org>2022-01-01 01:24:27 +0000
commitc4ef5112a240de1681c74e4c6b64939090fe0193 (patch)
treefc4b2111f4e2d92b1c5e19e45e4bdc3dd470c7b3 /lib
parent1775521c6e3395eada1812575f2df48706386866 (diff)
Introduce pre-commit
* .pre-commit-config.yaml: New file. * .gitlab-ci.yml (stages): Add bootstrap. (pre-commit): New job. (bootstrap): Move to bootstrap stage. Remove trailing whitespace from all files.
Diffstat (limited to 'lib')
-rw-r--r--lib/appendstr.c2
-rw-r--r--lib/cleanup.c2
-rw-r--r--lib/sandbox.c2
-rw-r--r--lib/sandbox.h2
-rw-r--r--lib/security.c12
-rw-r--r--lib/util.c2
6 files changed, 11 insertions, 11 deletions
diff --git a/lib/appendstr.c b/lib/appendstr.c
index ef07ce88..ee545f4b 100644
--- a/lib/appendstr.c
+++ b/lib/appendstr.c
@@ -25,7 +25,7 @@
#include "manconfig.h"
-/* append strings to first argument, which is realloced to the correct size
+/* append strings to first argument, which is realloced to the correct size
first arg may be NULL */
char *appendstr (char *str, ...)
{
diff --git a/lib/cleanup.c b/lib/cleanup.c
index cf8aec1c..e7935e12 100644
--- a/lib/cleanup.c
+++ b/lib/cleanup.c
@@ -215,7 +215,7 @@ push_cleanup (cleanup_fun fun, void *arg, int sigsafe)
} else {
new_stack = xnmalloc (nslots+1, sizeof (slot));
}
-
+
if (!new_stack) return -1;
stack = new_stack;
++nslots;
diff --git a/lib/sandbox.c b/lib/sandbox.c
index d934a0f9..726db236 100644
--- a/lib/sandbox.c
+++ b/lib/sandbox.c
@@ -1,6 +1,6 @@
/*
* sandbox.c: Process sandboxing
- *
+ *
* Copyright (C) 2017 Colin Watson.
*
* This file is part of man-db.
diff --git a/lib/sandbox.h b/lib/sandbox.h
index a838e0e4..cb482ec2 100644
--- a/lib/sandbox.h
+++ b/lib/sandbox.h
@@ -1,6 +1,6 @@
/*
* sandbox.h: Interface to process sandboxing
- *
+ *
* Copyright (C) 2017 Colin Watson.
*
* This file is part of man-db.
diff --git a/lib/security.c b/lib/security.c
index 55f2d85d..cf14e350 100644
--- a/lib/security.c
+++ b/lib/security.c
@@ -1,6 +1,6 @@
/*
- * security.c: Routines to aid secure uid operations
- *
+ * security.c: Routines to aid secure uid operations
+ *
* Copyright (C) 1994, 1995 Graeme W. Wilford. (Wilf.)
* Copyright (C) 2001, 2003, 2004, 2007, 2010, 2011 Colin Watson.
*
@@ -20,7 +20,7 @@
* along with man-db; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
- * Mon Aug 8 20:35:30 BST 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
+ * Mon Aug 8 20:35:30 BST 1994 Wilf. (G.Wilford@ee.surrey.ac.uk)
*/
#ifdef HAVE_CONFIG_H
@@ -122,8 +122,8 @@ struct passwd *get_man_owner (void)
}
#endif /* MAN_OWNER */
-/*
- * function to gain user privs by either (a) dropping effective privs
+/*
+ * function to gain user privs by either (a) dropping effective privs
* completely (saved ids) or (b) reversing euid w/ uid.
* Ignore if superuser.
*/
@@ -143,7 +143,7 @@ void drop_effective_privs (void)
#endif /* MAN_OWNER */
}
-/*
+/*
* function to (re)gain setuid privs by (a) setting euid from suid or (b)
* (re)reversing uid w/ euid. Ignore if superuser.
*/
diff --git a/lib/util.c b/lib/util.c
index 580cafd0..631c6600 100644
--- a/lib/util.c
+++ b/lib/util.c
@@ -211,7 +211,7 @@ char *lang_dir (const char *filename)
const char *sm; /* the second "/man?/" dir */
ld = xstrdup ("");
- if (!filename)
+ if (!filename)
return ld;
/* Check whether filename is in a man page hierarchy. */