Commit Graph

15 Commits

Author SHA1 Message Date
Michael Jones
da332ed9e7
Add the InsertBraces command for clang-format to ensure that all conditionals always have braces (#1408)
- Why? Because code where conditionals lack braces is much harder to read, and prone to indentation confusion.
- How? Just added an extra flag to .clang-format and re-ran clang-format on all the files.

I also moved .clang-format up to the top level of the repo so that it can be applied to the fuzz targets as well.
2024-01-27 16:38:40 -08:00
Gustavo Garcia
d9108a4b54
Add clang format rules and checks (#935)
I would like to get feedback on this and see if people is confortable
with these clang rules.

Right now is using the "llvm" style increasing the line length from 80
to 120 given that coturn is using long lines often.

Co-authored-by: Pavel Punsky <eakraly@users.noreply.github.com>
2022-11-06 22:05:17 +01:00
Paul Kramer
5a28394200
feature(1026): add sessioncount to prometheus metrics (#1075)
Co-authored-by: Paul Kramer <paul.kramer@logmein.com>
2022-11-06 10:19:20 -08:00
Gregor Jasny
8c15f4bf23
Fix warnings (#1046)
Clang emitted some easy to fix warnings.
2022-10-25 09:28:46 -07:00
Pavel Punsky
bd9e44dd7c
Replace bcopy with memcpy (#991)
Replace all instances of `bcopy` with memcpy.

Inspired by https://github.com/coturn/coturn/pull/855
2022-09-20 10:39:11 +02:00
Pavel Punsky
ae259637eb
Replace bzero with memset (#986)
Replace all instances of `bzero` with memset by find-replace-edit.
This is straightforward replacement which is suboptimal in a few cases
(for example we could use calloc instead of malloc+memset(0))

Inspired by #855
2022-09-17 08:36:28 +02:00
Bradley T. Hughes
d2ee3ac291 Remove [su]{08,16,32,64}bits type defines
Do not overload the standard types with #defines, just use them
directly.
2019-03-08 09:08:30 +01:00
Bradley T. Hughes
7a43aae7c3 Remove ns_bzero(), ns_bcopy(), and ns_bcmp()
Do not overload bzero(), bcopy(), and bcmp() from strings.h
2019-03-07 08:39:20 +01:00
Bradley T. Hughes
b50fc77124 Remote turn_free()
Do not overload free() with a different API.
2019-03-07 07:58:12 +01:00
Bradley T. Hughes
31033c3ffa Remote turn_realloc()
Do not overload realloc() with a different API.
2019-03-07 07:57:35 +01:00
Bradley T. Hughes
fef016901e Remove turn_malloc()
Do not overload malloc() from stdlib.h
2019-03-06 23:38:20 +01:00
Oleg Moskalenko
f1bf8eda4b minor string maps cleanup 2015-08-13 00:03:29 -07:00
mom040267
58efbf9635 fixes 2014-10-09 08:37:42 +00:00
mom040267
c1d067d957 compilation warning fixed 2014-04-27 18:22:07 +00:00
mom040267
702b29bc22 initial code import 2014-04-20 21:10:18 +00:00