Formatting: Double space before functions.

This commit is contained in:
Roger A. Light
2025-09-17 12:03:03 +01:00
parent a9fe4037ea
commit 67ad22df0a
328 changed files with 1806 additions and 26 deletions
+4
View File
@@ -26,15 +26,18 @@
static int run = 1;
static MYSQL_STMT *stmt = NULL;
void handle_signal(int s)
{
run = 0;
}
void connect_callback(struct mosquitto *mosq, void *obj, int result)
{
}
void message_callback(struct mosquitto *mosq, void *obj, const struct mosquitto_message *message)
{
MYSQL_BIND bind[2];
@@ -55,6 +58,7 @@ void message_callback(struct mosquitto *mosq, void *obj, const struct mosquitto_
mysql_stmt_execute(stmt);
}
int main(int argc, char *argv[])
{
MYSQL *connection;
+2
View File
@@ -12,6 +12,7 @@
# define UNUSED(A) (void)(A)
#endif
/* Callback called when the client receives a CONNACK message from the broker. */
void on_connect(struct mosquitto *mosq, void *obj, int reason_code)
{
@@ -54,6 +55,7 @@ int get_temperature(void)
return (int)random()%100;
}
/* This function pretends to read some data from a sensor and publish it.*/
void publish_sensor_data(struct mosquitto *mosq)
{
+2
View File
@@ -14,6 +14,7 @@
# define UNUSED(A) (void)(A)
#endif
/* Callback called when the client receives a CONNACK message from the broker. */
void on_connect(struct mosquitto *mosq, void *obj, int reason_code)
{
@@ -56,6 +57,7 @@ int get_temperature(void)
return (int)random()%100;
}
/* This function pretends to read some data from a sensor and publish it.*/
void publish_sensor_data(struct mosquitto *mosq)
{
+1
View File
@@ -2,6 +2,7 @@
#include <stdio.h>
#include "mosquitto.h"
int on_message(struct mosquitto *mosq, void *userdata, const struct mosquitto_message *msg)
{
printf("%s %s (%d)\n", msg->topic, (const char *)msg->payload, msg->payloadlen);
+1
View File
@@ -4,6 +4,7 @@
#define COUNT 3
int main(int argc, char *argv[])
{
int rc;
+1
View File
@@ -2,6 +2,7 @@
#include <stdio.h>
#include "mosquitto.h"
int main(int argc, char *argv[])
{
int rc;