Commit 00720f0
smack: avoid unused 'sip' variable warning
The mix of IS_ENABLED() and #ifdef checks has left a combination
that causes a warning about an unused variable:
security/smack/smack_lsm.c: In function 'smack_socket_connect':
security/smack/smack_lsm.c:2838:24: error: unused variable 'sip' [-Werror=unused-variable]
2838 | struct sockaddr_in6 *sip = (struct sockaddr_in6 *)sap;
Change the code to use C-style checks consistently so the compiler
can handle it correctly.
Fixes: 87fbfff ("broken ping to ipv6 linklocal addresses on debian buster")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>1 parent 7111951 commit 00720f0
2 files changed
+8
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
152 | 151 | | |
153 | 152 | | |
154 | 153 | | |
| |||
159 | 158 | | |
160 | 159 | | |
161 | 160 | | |
162 | | - | |
163 | 161 | | |
164 | | - | |
165 | 162 | | |
166 | 163 | | |
167 | 164 | | |
| |||
174 | 171 | | |
175 | 172 | | |
176 | 173 | | |
177 | | - | |
178 | 174 | | |
179 | 175 | | |
180 | 176 | | |
| |||
335 | 331 | | |
336 | 332 | | |
337 | 333 | | |
338 | | - | |
339 | 334 | | |
340 | | - | |
341 | 335 | | |
342 | 336 | | |
343 | 337 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
| 53 | + | |
55 | 54 | | |
56 | | - | |
57 | 55 | | |
58 | 56 | | |
59 | 57 | | |
| |||
2320 | 2318 | | |
2321 | 2319 | | |
2322 | 2320 | | |
2323 | | - | |
2324 | 2321 | | |
2325 | 2322 | | |
2326 | 2323 | | |
| |||
2388 | 2385 | | |
2389 | 2386 | | |
2390 | 2387 | | |
2391 | | - | |
2392 | 2388 | | |
2393 | 2389 | | |
2394 | 2390 | | |
| |||
2477 | 2473 | | |
2478 | 2474 | | |
2479 | 2475 | | |
2480 | | - | |
2481 | 2476 | | |
2482 | 2477 | | |
2483 | 2478 | | |
| |||
2510 | 2505 | | |
2511 | 2506 | | |
2512 | 2507 | | |
2513 | | - | |
2514 | 2508 | | |
2515 | 2509 | | |
2516 | 2510 | | |
| |||
2599 | 2593 | | |
2600 | 2594 | | |
2601 | 2595 | | |
| 2596 | + | |
2602 | 2597 | | |
2603 | 2598 | | |
2604 | 2599 | | |
| |||
2661 | 2656 | | |
2662 | 2657 | | |
2663 | 2658 | | |
2664 | | - | |
2665 | 2659 | | |
2666 | 2660 | | |
2667 | 2661 | | |
| |||
2836 | 2830 | | |
2837 | 2831 | | |
2838 | 2832 | | |
2839 | | - | |
2840 | | - | |
2841 | | - | |
| 2833 | + | |
2842 | 2834 | | |
2843 | 2835 | | |
2844 | 2836 | | |
2845 | | - | |
2846 | | - | |
| 2837 | + | |
| 2838 | + | |
2847 | 2839 | | |
2848 | 2840 | | |
2849 | 2841 | | |
2850 | 2842 | | |
2851 | 2843 | | |
2852 | 2844 | | |
2853 | | - | |
2854 | | - | |
2855 | | - | |
2856 | | - | |
| 2845 | + | |
| 2846 | + | |
| 2847 | + | |
2857 | 2848 | | |
2858 | 2849 | | |
2859 | 2850 | | |
| |||
0 commit comments