Skip to content

generic code clean-up

Antonio Quartulli openvpn-devel 1 version In review

Get series with b4
b4 am [email protected]...

Versions newest first

  1. v1 Latest5 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5make function declarations C99 compliantsrc/openvpn/buffer.c src/openvpn/console.c src/openvpn/console.h +24 more+56 -562 replies
2/5ensure function declarations are compiled with their definitionssrc/openvpn/crypto.h src/openvpn/error.c src/openvpn/forward-inline.h +15 more+97 -693 replies
3/5add missing static attribute to functionssrc/openvpn/comp-lz4.c src/openvpn/forward.c src/openvpn/manage.c +8 more+18 -182 replies
4/5remove unused functionssrc/openvpn/misc.c src/openvpn/ssl.c src/openvpn/ssl_openssl.c+0 -392 replies
5/5use NULL instead of 0 when assigning pointerssrc/openvpn/ps.c src/openvpn/ssl_openssl.c src/openvpn/ssl_verify_openssl.c+4 -43 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Openvpn-devel] [PATCH 0/5] generic code clean-up

These 5 patches contain basic clean-up work about
issues highlighted by static analyzers during
some test-runs.

All the patches except "ensure function declarations are compiled with their definitions" should be straightforward. For the latter
I can imagine there might be some arguments against it.

Cheers,

Antonio Quartulli (5):
make function declarations C99 compliant
ensure function declarations are compiled with their definitions add missing static attribute to functions
remove unused functions
use NULL instead of 0 when assigning pointers

 src/openvpn/buffer.c             |  2 +-
 src/openvpn/comp-lz4.c           |  2 +-
 src/openvpn/console.c            |  2 +-
 src/openvpn/console.h            |  8 ++++----
 src/openvpn/console_builtin.c    |  2 +-
 src/openvpn/console_systemd.c    |  4 ++--
 src/openvpn/crypto.c             |  4 ++--
 src/openvpn/crypto.h             |  5 ++++-
 src/openvpn/crypto_mbedtls.c     | 10 +++++-----
 src/openvpn/crypto_mbedtls.h     |  4 ++--
 src/openvpn/crypto_openssl.c     |  6 +++---
 src/openvpn/error.c              |  9 ++++-----
 src/openvpn/error.h              |  2 +-
 src/openvpn/forward-inline.h     | 28 ++--------------------------
 src/openvpn/forward.c            |  2 +-
 src/openvpn/forward.h            | 35 +++++++++++++++++++++++++++++++++++
 src/openvpn/init.c               |  2 +-
 src/openvpn/init.h               |  2 ++
 src/openvpn/interval.h           |  2 +-
 src/openvpn/lladdr.c             |  1 +
 src/openvpn/manage.c             |  8 ++++----
 src/openvpn/manage.h             | 11 ++++++-----
 src/openvpn/mbuf.h               |  4 ++--
 src/openvpn/misc.c               | 23 -----------------------
 src/openvpn/mroute.h             | 21 +++++++++++----------
 src/openvpn/mtcp.c               |  2 +-
 src/openvpn/multi.c              |  4 ++--
 src/openvpn/multi.h              |  7 +++----
 src/openvpn/ntlm.c               |  2 +-
 src/openvpn/occ-inline.h         | 10 +++-------
 src/openvpn/occ.h                |  6 ++++++
 src/openvpn/options.c            |  8 ++++----
 src/openvpn/packet_id.c          |  2 +-
 src/openvpn/packet_id.h          |  2 +-
 src/openvpn/pf-inline.h          |  6 ++----
 src/openvpn/pf.h                 |  6 ++++++
 src/openvpn/ping-inline.h        |  6 ++----
 src/openvpn/ping.h               |  4 ++++
 src/openvpn/pkcs11.c             |  6 +++---
 src/openvpn/platform.c           |  2 +-
 src/openvpn/plugin.h             |  2 ++
 src/openvpn/proxy.c              |  2 +-
 src/openvpn/ps.c                 |  4 ++--
 src/openvpn/route.c              |  4 ++--
 src/openvpn/socket.c             |  2 +-
 src/openvpn/socket.h             | 13 +++++++------
 src/openvpn/ssl.c                | 16 +++-------------
 src/openvpn/ssl_backend.h        |  6 +++---
 src/openvpn/ssl_mbedtls.c        |  6 +++---
 src/openvpn/ssl_openssl.c        | 20 +++++++-------------
 src/openvpn/ssl_verify_openssl.c |  4 ++--
 src/openvpn/win32.c              |  6 +++---
 src/openvpn/win32.h              |  4 ++--
 53 files changed, 175 insertions(+), 186 deletions(-)
Signature · 1 line
2.14.0