diff options
| author | John Crispin <john@phrozen.org> | 2019-06-30 13:03:23 +0200 |
|---|---|---|
| committer | John Crispin <john@phrozen.org> | 2019-06-30 13:03:23 +0200 |
| commit | ff7c509caa61e41b4a740c30384cf3290124d9bd (patch) | |
| tree | fc93d1a8a955c66ac5cde19e1d3d8225bbd0e837 /mcproxy | |
| parent | a56d996b94682c90729ad9b561168635b857649c (diff) | |
mcproxy: fix up sourcefilter patch
this spewed out 2 compile warnings
In file included from build_dir/target-mipsel_24kc_musl/mcproxy-2017-08-24-93b5ace42268160ebbfff4c61818fb15fa2d9b99/mcproxy/src/utils/mc_socket.cpp:43:0:
build_dir/target-mipsel_24kc_musl/mcproxy-2017-08-24-93b5ace42268160ebbfff4c61818fb15fa2d9b99/mcproxy/src/utils/sourcefilter.cpp: In function 'int setsourcefilter(int, uint32_t, const sockaddr*, socklen_t, uint32_t, uint32_t, const sockaddr_storage*)':
build_dir/target-mipsel_24kc_musl/mcproxy-2017-08-24-93b5ace42268160ebbfff4c61818fb15fa2d9b99/mcproxy/src/utils/sourcefilter.cpp:157:3: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
else
^~~~
build_dir/target-mipsel_24kc_musl/mcproxy-2017-08-24-93b5ace42268160ebbfff4c61818fb15fa2d9b99/mcproxy/src/utils/sourcefilter.cpp:160:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
int save_errno = errno;
^~~
Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'mcproxy')
| -rw-r--r-- | mcproxy/patches/0003-add-sourcefilter.patch | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/mcproxy/patches/0003-add-sourcefilter.patch b/mcproxy/patches/0003-add-sourcefilter.patch index 2f64975..cf67411 100644 --- a/mcproxy/patches/0003-add-sourcefilter.patch +++ b/mcproxy/patches/0003-add-sourcefilter.patch @@ -1,5 +1,7 @@ ---- a/mcproxy/src/utils/mc_socket.cpp -+++ b/mcproxy/src/utils/mc_socket.cpp +Index: mcproxy-2017-08-24-93b5ace42268160ebbfff4c61818fb15fa2d9b99/mcproxy/src/utils/mc_socket.cpp +=================================================================== +--- mcproxy-2017-08-24-93b5ace42268160ebbfff4c61818fb15fa2d9b99.orig/mcproxy/src/utils/mc_socket.cpp ++++ mcproxy-2017-08-24-93b5ace42268160ebbfff4c61818fb15fa2d9b99/mcproxy/src/utils/mc_socket.cpp @@ -37,6 +37,10 @@ #include <numeric> #include <unistd.h> @@ -11,8 +13,10 @@ std::string ipAddrResolver(std::string ipAddr) { std::string str[][2] = { +Index: mcproxy-2017-08-24-93b5ace42268160ebbfff4c61818fb15fa2d9b99/mcproxy/src/utils/sourcefilter.cpp +=================================================================== --- /dev/null -+++ b/mcproxy/src/utils/sourcefilter.cpp ++++ mcproxy-2017-08-24-93b5ace42268160ebbfff4c61818fb15fa2d9b99/mcproxy/src/utils/sourcefilter.cpp @@ -0,0 +1,165 @@ +/* Get source filter. Linux version. + Copyright (C) 2004-2014 Free Software Foundation, Inc. @@ -173,9 +177,9 @@ + else + result = setsockopt (s, sol, MCAST_MSFILTER, gf, needed); + -+ int save_errno = errno; -+ free (gf); -+ errno = save_errno; ++ int save_errno = errno; ++ free (gf); ++ errno = save_errno; + + return result; +} |
