mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-04-10 09:35:31 +02:00
Uncrustify config, plus updated format changes
This commit is contained in:
parent
4c24b92e34
commit
0a6fa2ee90
3752
.uncrustify.cfg
Normal file
3752
.uncrustify.cfg
Normal file
File diff suppressed because it is too large
Load diff
11
format.sh
Executable file
11
format.sh
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
find -name '*.c' -exec uncrustify -c .uncrustify.cfg --no-backup {} \;
|
||||
find -name '*.cpp' -exec uncrustify -c .uncrustify.cfg --no-backup {} \;
|
||||
find -name '*.h' -exec uncrustify -c .uncrustify.cfg --no-backup {} \;
|
||||
|
||||
git checkout deps/picohttpparser/picohttpparser.h
|
||||
git checkout deps/picohttpparser/picohttpparser.c
|
||||
git checkout deps/utlist.h
|
||||
git checkout deps/uthash.h
|
||||
rm -f deps/uthash.h.uncrustify
|
||||
|
|
@ -50,7 +50,7 @@ Contributors:
|
|||
|
||||
MOSQUITTO_PLUGIN_DECLARE_VERSION(5);
|
||||
|
||||
struct plugin_data{
|
||||
struct plugin_data {
|
||||
mosquitto_plugin_id_t *pid;
|
||||
char *input_topic_filter;
|
||||
char *output_topic;
|
||||
|
|
@ -95,6 +95,7 @@ static int callback_message_in(int event, void *event_data, void *userdata)
|
|||
return MOSQ_ERR_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
int mosquitto_plugin_init(mosquitto_plugin_id_t *identifier, void **userdata, struct mosquitto_opt *opts, int opt_count)
|
||||
{
|
||||
struct plugin_data *data = mosquitto_calloc(1, sizeof(struct plugin_data));
|
||||
|
|
@ -142,6 +143,7 @@ int mosquitto_plugin_init(mosquitto_plugin_id_t *identifier, void **userdata, st
|
|||
return mosquitto_callback_register(data->pid, MOSQ_EVT_MESSAGE_IN, callback_message_in, NULL, data);
|
||||
}
|
||||
|
||||
|
||||
/* mosquitto_plugin_cleanup() is optional in 2.1 and later. Use it only if you have your own cleanup to do */
|
||||
int mosquitto_plugin_cleanup(void *userdata, struct mosquitto_opt *opts, int opt_count)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ extern struct metric metrics[mosq_metric_max];
|
|||
#endif
|
||||
|
||||
#ifndef S_ISREG
|
||||
#define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
|
||||
#define S_ISREG(mode) (((mode)&S_IFMT) == S_IFREG)
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue