aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmanuele Torre <torreemanuele6@gmail.com>2023-04-11 00:25:46 +0200
committerAndrew G. Morgan <morgan@kernel.org>2023-04-10 17:23:58 -0700
commita4089305d9fb1aac74966727be2244ef831cb598 (patch)
tree35ee05cbd83dbaffd84998a30cd59d961b9190e1
parent3c7dda330bd9a154bb5b878d31fd591e4951fe17 (diff)
downloadlibcap-a4089305d9fb1aac74966727be2244ef831cb598.tar.gz
Improve style in man page function prototypes
Use type *id everywhere instead of using type * id and type* id in some places. Also remove superflous spaces after commas, and closing parentheses. While doing this, I also fixed a C syntax mistake in an example in cap_launch.3 Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
-rw-r--r--doc/cap_from_text.36
-rw-r--r--doc/cap_launch.38
2 files changed, 7 insertions, 7 deletions
diff --git a/doc/cap_from_text.3 b/doc/cap_from_text.3
index a0c9282..1a01c7c 100644
--- a/doc/cap_from_text.3
+++ b/doc/cap_from_text.3
@@ -9,9 +9,9 @@ state textual representation translation
.nf
#include <sys/capability.h>
-cap_t cap_from_text(const char* buf_p );
-char *cap_to_text(cap_t caps, ssize_t * len_p);
-int cap_from_name(const char* name , cap_value_t* cap_p);
+cap_t cap_from_text(const char *buf_p);
+char *cap_to_text(cap_t caps, ssize_t *len_p);
+int cap_from_name(const char *name, cap_value_t *cap_p);
char *cap_to_name(cap_value_t cap);
.fi
.sp
diff --git a/doc/cap_launch.3 b/doc/cap_launch.3
index 1656428..2d186eb 100644
--- a/doc/cap_launch.3
+++ b/doc/cap_launch.3
@@ -8,8 +8,8 @@ cap_launch, cap_launcher_setuid, cap_launcher_setgroups \
.nf
#include <sys/capability.h>
-cap_launch_t cap_new_launcher(const char *arg0, const char * const *argv,
- const char * const *envp);
+cap_launch_t cap_new_launcher(const char *arg0, const char *const *argv,
+ const char *const *envp);
cap_launch_t cap_func_launcher(int (callback_fn)(void *detail));
@@ -82,9 +82,9 @@ outside the main process of the calling application. An example of
this would be to allocate detail as follows:
.nf
- const *char[] args = { "echo", "hello", NULL };
+ const char *args[] = { "echo", "hello", NULL };
cap_launch_t cmd = cap_new_launcher("/usr/bin/echo", args, NULL);
- int *detail = mmap(NULL, sizeof(int), PROT_READ | PROT_WRITE,
+ int *detail = mmap(NULL, sizeof(int), PROT_READ | PROT_WRITE,
MAP_SHARED | MAP_ANONYMOUS, -1, 0);
cap_launcher_callback(cmd, &answer_detail_fn);
*detail = 41;