Skip to content

Commit 5d9f33a

Browse files
authored
Some clean-ups (#305)
* all: remove trailing whitespaces These trailing whitespaces are useless characters. Many text editors remove them automatically, and Git also complains about them. Best to remove them to avoid unwanted changes, and warnings. Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> * include: add missing std include When checking header files individually, some of them didn't include stdbool.h ('bool' type) or stdint.h (uint32_t type). Add the missing headers to have all these header files self-contained: they can be compiled alone with analytic tools. Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> * c: remove unused headers 'clangd' reported a few unused headers. Best to remove them then. Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> * tests: fix strict-prototypes warning clangd reported this issue: A function declaration without a prototype is deprecated in all versions of C. We can simply adding 'void', we don't need any arguments there. Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> * git: ignore compile_commands.json file It is useful to be used with clangd to enhance a text editor. This file can be generated with bear, e.g. $ make clean $ bear --append -- make -j$(nproc) all check While at it, also ignore .plist files: some CLang diagnostics files. Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> * git: ignore hidden files / directories Similar to what is done in the Linux kernel: very likely, hidden files and directories don't need to be tracked in git. There are exceptions of course, like the '.github' directory, but we can always force their inclusions with 'git add -f'. This will at least ignore the '.cache' directory created by clangd. Editors tend to create hidden directories and files too, so that would cover that too. Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> --------- Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
1 parent 824ff8c commit 5d9f33a

File tree

15 files changed

+19
-15
lines changed

15 files changed

+19
-15
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.*
12
*.o
23
*.lo
34
*.la
@@ -59,3 +60,5 @@ tests/*.log
5960
tests/*.trs
6061
tests/test-suite.log
6162
README
63+
compile_commands.json
64+
*.plist

CODE_OF_CONDUCT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,11 @@ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
121121
version 2.0, available at
122122
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
123123

124-
Community Impact Guidelines were inspired by
124+
Community Impact Guidelines were inspired by
125125
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
126126

127127
For answers to common questions about this code of conduct, see the FAQ at
128-
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
128+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
129129
at [https://www.contributor-covenant.org/translations][translations].
130130

131131
[homepage]: https://www.contributor-covenant.org

include/mptcpd/path_manager.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
#ifndef MPTCPD_LIB_PATH_MANAGER_H
1111
#define MPTCPD_LIB_PATH_MANAGER_H
1212

13+
#include <stdbool.h>
14+
1315
#include <mptcpd/export.h>
1416
#include <mptcpd/types.h>
1517

include/mptcpd/private/configuration.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
#ifndef MPTCPD_CONFIGURATION_H
1111
#define MPTCPD_CONFIGURATION_H
1212

13+
#include <stdint.h>
14+
1315

1416
/**
1517
* Function pointer corresponding to the ELL functions that set the

include/mptcpd/private/id_manager.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
#ifndef MPTCPD_PRIVATE_ID_MANAGER_H
1111
#define MPTCPD_PRIVATE_ID_MANAGER_H
1212

13+
#include <stdbool.h>
14+
1315
#include <mptcpd/export.h>
1416
#include <mptcpd/types.h>
1517

include/mptcpd/private/path_manager.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
#ifndef MPTCPD_PRIVATE_PATH_MANAGER_H
1111
#define MPTCPD_PRIVATE_PATH_MANAGER_H
1212

13+
#include <stdbool.h>
14+
1315
#include <mptcpd/types.h>
1416

1517

lib/id_manager.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#define _POSIX_C_SOURCE 200112L ///< For XSI-compliant strerror_r().
1515

1616
#include <assert.h>
17-
#include <errno.h>
1817
#include <stdint.h>
1918
#include <string.h>
2019
#include <sys/socket.h>

lib/plugin.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ static void load_plugin(char const *filename)
290290
static void load_plugins_queue(char const *dir,
291291
struct l_queue const* plugins_to_load)
292292
{
293-
struct l_queue_entry const *entry =
293+
struct l_queue_entry const *entry =
294294
l_queue_get_entries((struct l_queue *) plugins_to_load);
295295

296296
while (entry) {
@@ -359,8 +359,8 @@ static int load_plugins_all(int const fd,
359359
}
360360

361361

362-
static int load_plugins(char const *dir,
363-
struct l_queue const *plugins_to_load,
362+
static int load_plugins(char const *dir,
363+
struct l_queue const *plugins_to_load,
364364
struct mptcpd_pm *pm)
365365
{
366366
/**

man/mptcpd.8.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ overriding plugin priorities
129129
.TP
130130
.BI \-\-load\-plugins= PLUGINS
131131
set plugins to load on startup, where
132-
.I PLUGINS
132+
.I PLUGINS
133133
is a comma separated list containing one or more plugin names
134134

135135
.TP

src/configuration.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include <stdio.h>
1616
#include <stdbool.h>
1717
#include <argp.h>
18-
#include <ctype.h> // For isalnum().
1918
#include <assert.h>
2019
#include <sys/types.h>
2120
#include <sys/stat.h>

0 commit comments

Comments
 (0)