From 8f37f4e6eb48bd8dc1fb94dea0aa573face65fbb Mon Sep 17 00:00:00 2001 From: elvis Date: Sat, 7 May 2022 23:00:47 +0200 Subject: [PATCH] style and comments for threadpool.c --- lib/threadpool/threadpool.c | 4 ++-- lib/utils/message.h | 2 +- lib/utils/serverUtil.h | 3 ++- lib/utils/strsep_gnu.c | 3 ++- lib/utils/util.h | 13 ++++++------- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/lib/threadpool/threadpool.c b/lib/threadpool/threadpool.c index 60c9e36..3e83433 100644 --- a/lib/threadpool/threadpool.c +++ b/lib/threadpool/threadpool.c @@ -10,8 +10,8 @@ #include #include -#include -#include +#include "util.h" +#include "threadpool.h" /** * @function void *threadpool_thread(void *threadpool) diff --git a/lib/utils/message.h b/lib/utils/message.h index da0ea0a..ab1465e 100644 --- a/lib/utils/message.h +++ b/lib/utils/message.h @@ -2,7 +2,7 @@ #define _MESSAGE_H /** - * tipo del messaggio + * message structure that get sent from the client */ typedef struct msg { long len; diff --git a/lib/utils/serverUtil.h b/lib/utils/serverUtil.h index 9f0afd4..3f42fce 100644 --- a/lib/utils/serverUtil.h +++ b/lib/utils/serverUtil.h @@ -2,11 +2,12 @@ #ifndef _SERVER_UTIL #define _SERVER_UTIL -#include #include #include #include +#include "ini.h" + #define CONFGETINT(var, config, t, q, p, base) \ var = (int) strtol(ini_get(config, t, q), p, base); \ if(var<=0) { \ diff --git a/lib/utils/strsep_gnu.c b/lib/utils/strsep_gnu.c index 3d5a787..dfc36dc 100644 --- a/lib/utils/strsep_gnu.c +++ b/lib/utils/strsep_gnu.c @@ -12,7 +12,8 @@ License along with the GNU C Library; if not, see . */ #include -#include + +#include "strsep_gnu.h" char * strsep_gnu (char **stringp, const char *delim) diff --git a/lib/utils/util.h b/lib/utils/util.h index aed20e0..f527699 100644 --- a/lib/utils/util.h +++ b/lib/utils/util.h @@ -1,16 +1,16 @@ #ifndef _UTIL_H #define _UTIL_H -#include #include #include +#include #include -#include +#include +#include +#include #include #include -#include -#include -#include +#include #if !defined(BUFSIZE) #define BUFSIZE 256 @@ -62,8 +62,7 @@ } /** - * \brief Procedura di utilita' per la stampa degli errori - * + * @brief Procedura di utilita' per la stampa degli errori */ static inline void print_error(const char * str, ...) { const char err[]="ERROR: ";