Skip to content

Commit 776b4fd

Browse files
committed
Bump license, removed tabs
1 parent 0c3c0b3 commit 776b4fd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+60
-60
lines changed

COPYING

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BSD 2-Clause License
22

3-
Copyright (c) 2019, Andrea Giacomo Baldan
3+
Copyright (c) 2023, Andrea Giacomo Baldan
44
All rights reserved.
55

66
Redistribution and use in source and binary forms, with or without

src/bst.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* BSD 2-Clause License
33
*
4-
* Copyright (c) 2018, 2019 Andrea Giacomo Baldan All rights reserved.
4+
* Copyright (c) 2023 Andrea Giacomo Baldan All rights reserved.
55
*
66
* Redistribution and use in source and binary forms, with or without
77
* modification, are permitted provided that the following conditions are met:

src/bst.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* BSD 2-Clause License
33
*
4-
* Copyright (c) 2020 Andrea Giacomo Baldan All rights reserved.
4+
* Copyright (c) 2023 Andrea Giacomo Baldan All rights reserved.
55
*
66
* Redistribution and use in source and binary forms, with or without
77
* modification, are permitted provided that the following conditions are met:

src/config.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* BSD 2-Clause License
22
*
3-
* Copyright (c) 2019, Andrea Giacomo Baldan All rights reserved.
3+
* Copyright (c) 2023, Andrea Giacomo Baldan All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
66
* modification, are permitted provided that the following conditions are met:

src/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* BSD 2-Clause License
22
*
3-
* Copyright (c) 2020, Andrea Giacomo Baldan All rights reserved.
3+
* Copyright (c) 2023, Andrea Giacomo Baldan All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
66
* modification, are permitted provided that the following conditions are met:

src/ev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* BSD 2-Clause License
22
*
3-
* Copyright (c) 2020, Andrea Giacomo Baldan All rights reserved.
3+
* Copyright (c) 2023, Andrea Giacomo Baldan All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
66
* modification, are permitted provided that the following conditions are met:

src/ev.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* BSD 2-Clause License
22
*
3-
* Copyright (c) 2020, Andrea Giacomo Baldan All rights reserved.
3+
* Copyright (c) 2023, Andrea Giacomo Baldan All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
66
* modification, are permitted provided that the following conditions are met:

src/handlers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* BSD 2-Clause License
22
*
3-
* Copyright (c) 2019, Andrea Giacomo Baldan All rights reserved.
3+
* Copyright (c) 2023, Andrea Giacomo Baldan All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
66
* modification, are permitted provided that the following conditions are met:

src/handlers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* BSD 2-Clause License
22
*
3-
* Copyright (c) 2019, Andrea Giacomo Baldan All rights reserved.
3+
* Copyright (c) 2023, Andrea Giacomo Baldan All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
66
* modification, are permitted provided that the following conditions are met:

src/iterator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* BSD 2-Clause License
33
*
4-
* Copyright (c) 2019, Andrea Giacomo Baldan All rights reserved.
4+
* Copyright (c) 2023, Andrea Giacomo Baldan All rights reserved.
55
*
66
* Redistribution and use in source and binary forms, with or without
77
* modification, are permitted provided that the following conditions are met:

src/iterator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* BSD 2-Clause License
33
*
4-
* Copyright (c) 2019, Andrea Giacomo Baldan All rights reserved.
4+
* Copyright (c) 2023, Andrea Giacomo Baldan All rights reserved.
55
*
66
* Redistribution and use in source and binary forms, with or without
77
* modification, are permitted provided that the following conditions are met:

src/list.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* BSD 2-Clause License
22
*
3-
* Copyright (c) 2019, Andrea Giacomo Baldan
3+
* Copyright (c) 2023, Andrea Giacomo Baldan
44
* All rights reserved.
55
*
66
* Redistribution and use in source and binary forms, with or without

src/list.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* BSD 2-Clause License
22
*
3-
* Copyright (c) 2019, Andrea Giacomo Baldan
3+
* Copyright (c) 2023, Andrea Giacomo Baldan
44
* All rights reserved.
55
*
66
* Redistribution and use in source and binary forms, with or without

src/logging.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* BSD 2-Clause License
22
*
3-
* Copyright (c) 2020, Andrea Giacomo Baldan All rights reserved.
3+
* Copyright (c) 2023, Andrea Giacomo Baldan All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
66
* modification, are permitted provided that the following conditions are met:

src/logging.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* BSD 2-Clause License
22
*
3-
* Copyright (c) 2020, Andrea Giacomo Baldan All rights reserved.
3+
* Copyright (c) 2023, Andrea Giacomo Baldan All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
66
* modification, are permitted provided that the following conditions are met:

src/memory.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* BSD 2-Clause License
22
*
3-
* Copyright (c) 2020, Andrea Giacomo Baldan All rights reserved.
3+
* Copyright (c) 2023, Andrea Giacomo Baldan All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
66
* modification, are permitted provided that the following conditions are met:

src/memory.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* BSD 2-Clause License
22
*
3-
* Copyright (c) 2020, Andrea Giacomo Baldan All rights reserved.
3+
* Copyright (c) 2023, Andrea Giacomo Baldan All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
66
* modification, are permitted provided that the following conditions are met:

src/memorypool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* BSD 2-Clause License
22
*
3-
* Copyright (c) 2019, Andrea Giacomo Baldan
3+
* Copyright (c) 2023, Andrea Giacomo Baldan
44
* All rights reserved.
55
*
66
* Redistribution and use in source and binary forms, with or without

src/memorypool.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* BSD 2-Clause License
22
*
3-
* Copyright (c) 2019, Andrea Giacomo Baldan
3+
* Copyright (c) 2023, Andrea Giacomo Baldan
44
* All rights reserved.
55
*
66
* Redistribution and use in source and binary forms, with or without

src/mqtt.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* BSD 2-Clause License
22
*
3-
* Copyright (c) 2019, Andrea Giacomo Baldan All rights reserved.
3+
* Copyright (c) 2023, Andrea Giacomo Baldan All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
66
* modification, are permitted provided that the following conditions are met:
@@ -110,19 +110,19 @@ int mqtt_encode_length(u8 *buf, usize len) {
110110
int bytes = 0;
111111
u16 encoded = 0;
112112

113-
do {
113+
do {
114114

115115
if (bytes + 1 > MAX_LEN_BYTES)
116116
return bytes;
117117

118-
encoded = len % 128;
119-
len /= 128;
118+
encoded = len % 128;
119+
len /= 128;
120120

121-
/* if there are more digits to encode, set the top bit of this digit */
122-
if (len > 0)
123-
encoded |= 128;
121+
/* if there are more digits to encode, set the top bit of this digit */
122+
if (len > 0)
123+
encoded |= 128;
124124

125-
buf[bytes++] = encoded;
125+
buf[bytes++] = encoded;
126126

127127
} while (len > 0);
128128

@@ -139,14 +139,14 @@ int mqtt_encode_length(u8 *buf, usize len) {
139139
usize mqtt_decode_length(u8 *buf, unsigned *pos) {
140140

141141
u8 c;
142-
u64 multiplier = 1LL;
143-
u64 value = 0LL;
142+
u64 multiplier = 1LL;
143+
u64 value = 0LL;
144144
*pos = 0;
145145

146-
do {
146+
do {
147147
c = *buf;
148-
value += (c & 127) * multiplier;
149-
multiplier *= 128;
148+
value += (c & 127) * multiplier;
149+
multiplier *= 128;
150150
++buf;
151151
++(*pos);
152152
} while ((c & 128) != 0);

src/mqtt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* BSD 2-Clause License
22
*
3-
* Copyright (c) 2019, Andrea Giacomo Baldan All rights reserved.
3+
* Copyright (c) 2023, Andrea Giacomo Baldan All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
66
* modification, are permitted provided that the following conditions are met:

src/network.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* BSD 2-Clause License
33
*
4-
* Copyright (c) 2019, Andrea Giacomo Baldan All rights reserved.
4+
* Copyright (c) 2023, Andrea Giacomo Baldan All rights reserved.
55
*
66
* Redistribution and use in source and binary forms, with or without
77
* modification, are permitted provided that the following conditions are met:
@@ -343,8 +343,8 @@ static int client_certificate_verify(int preverify_ok, X509_STORE_CTX *ctx) {
343343

344344
(void) ctx; // Unused
345345

346-
/* Preverify should check expiry, revocation. */
347-
return preverify_ok;
346+
/* Preverify should check expiry, revocation. */
347+
return preverify_ok;
348348
}
349349

350350
void load_certificates(SSL_CTX *ctx, const char *ca,
@@ -356,10 +356,10 @@ void load_certificates(SSL_CTX *ctx, const char *ca,
356356
}
357357

358358
SSL_CTX_set_mode(ctx, SSL_MODE_ENABLE_PARTIAL_WRITE|SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
359-
SSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, client_certificate_verify);
359+
SSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, client_certificate_verify);
360360
SSL_CTX_set_ecdh_auto(ctx, 1);
361361

362-
if (SSL_CTX_use_certificate_chain_file(ctx, cert) <= 0) {
362+
if (SSL_CTX_use_certificate_chain_file(ctx, cert) <= 0) {
363363
ERR_print_errors_fp(stderr);
364364
exit(EXIT_FAILURE);
365365
}

src/network.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* BSD 2-Clause License
33
*
4-
* Copyright (c) 2019, Andrea Giacomo Baldan All rights reserved.
4+
* Copyright (c) 2023, Andrea Giacomo Baldan All rights reserved.
55
*
66
* Redistribution and use in source and binary forms, with or without
77
* modification, are permitted provided that the following conditions are met:

src/pack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* BSD 2-Clause License
22
*
3-
* Copyright (c) 2018, 2019 Andrea Giacomo Baldan All rights reserved.
3+
* Copyright (c) 2023 Andrea Giacomo Baldan All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
66
* modification, are permitted provided that the following conditions are met:

src/pack.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* BSD 2-Clause License
22
*
3-
* Copyright (c) 2018, Andrea Giacomo Baldan All rights reserved.
3+
* Copyright (c) 2023, Andrea Giacomo Baldan All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
66
* modification, are permitted provided that the following conditions are met:

src/ref.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* BSD 2-Clause License
22
*
3-
* Copyright (c) 2019, Andrea Giacomo Baldan All rights reserved.
3+
* Copyright (c) 2023, Andrea Giacomo Baldan All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
66
* modification, are permitted provided that the following conditions are met:

src/server.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* BSD 2-Clause License
22
*
3-
* Copyright (c) 2020, Andrea Giacomo Baldan All rights reserved.
3+
* Copyright (c) 2023, Andrea Giacomo Baldan All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
66
* modification, are permitted provided that the following conditions are met:

src/server.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* BSD 2-Clause License
22
*
3-
* Copyright (c) 2020, Andrea Giacomo Baldan All rights reserved.
3+
* Copyright (c) 2023, Andrea Giacomo Baldan All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
66
* modification, are permitted provided that the following conditions are met:

src/sol.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* BSD 2-Clause License
22
*
3-
* Copyright (c) 2019, Andrea Giacomo Baldan All rights reserved.
3+
* Copyright (c) 2023, Andrea Giacomo Baldan All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
66
* modification, are permitted provided that the following conditions are met:

src/sol_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* BSD 2-Clause License
33
*
4-
* Copyright (c) 2020, Andrea Giacomo Baldan All rights reserved.
4+
* Copyright (c) 2023, Andrea Giacomo Baldan All rights reserved.
55
*
66
* Redistribution and use in source and binary forms, with or without
77
* modification, are permitted provided that the following conditions are met:

src/subscriber.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* BSD 2-Clause License
22
*
3-
* Copyright (c) 2020, Andrea Giacomo Baldan All rights reserved.
3+
* Copyright (c) 2023, Andrea Giacomo Baldan All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
66
* modification, are permitted provided that the following conditions are met:

src/topic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* BSD 2-Clause License
22
*
3-
* Copyright (c) 2020, Andrea Giacomo Baldan All rights reserved.
3+
* Copyright (c) 2023, Andrea Giacomo Baldan All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
66
* modification, are permitted provided that the following conditions are met:

src/topic_store.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* BSD 2-Clause License
33
*
4-
* Copyright (c) 2020, Andrea Giacomo Baldan All rights reserved.
4+
* Copyright (c) 2023, Andrea Giacomo Baldan All rights reserved.
55
*
66
* Redistribution and use in source and binary forms, with or without
77
* modification, are permitted provided that the following conditions are met:

src/trie.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* BSD 2-Clause License
22
*
3-
* Copyright (c) 2018, 2019, Andrea Giacomo Baldan All rights reserved.
3+
* Copyright (c) 2023, Andrea Giacomo Baldan All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
66
* modification, are permitted provided that the following conditions are met:

src/trie.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* BSD 2-Clause License
22
*
3-
* Copyright (c) 2020, Andrea Giacomo Baldan
3+
* Copyright (c) 2023, Andrea Giacomo Baldan
44
* All rights reserved.
55
*
66
* Redistribution and use in source and binary forms, with or without

src/types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* BSD 2-Clause License
22
*
3-
* Copyright (c) 2020, Andrea Giacomo Baldan All rights reserved.
3+
* Copyright (c) 2023, Andrea Giacomo Baldan All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
66
* modification, are permitted provided that the following conditions are met:

src/util.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* BSD 2-Clause License
22
*
3-
* Copyright (c) 2020, Andrea Giacomo Baldan All rights reserved.
3+
* Copyright (c) 2023, Andrea Giacomo Baldan All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
66
* modification, are permitted provided that the following conditions are met:
@@ -120,9 +120,9 @@ int number_len(size_t number) {
120120
}
121121

122122
unsigned long unix_time_ns(void) {
123-
struct timeval time;
124-
gettimeofday(&time, NULL);
125-
return time.tv_sec * (int) 1e6 + time.tv_usec;
123+
struct timeval time;
124+
gettimeofday(&time, NULL);
125+
return time.tv_sec * (int) 1e6 + time.tv_usec;
126126
}
127127

128128
void generate_random_id(char *dest) {

src/util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* BSD 2-Clause License
22
*
3-
* Copyright (c) 2020, Andrea Giacomo Baldan All rights reserved.
3+
* Copyright (c) 2023, Andrea Giacomo Baldan All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
66
* modification, are permitted provided that the following conditions are met:

0 commit comments

Comments
 (0)