Part of the transition of done by this semantic patch: // <smpl> @ rule1 @ struct xt_target ops; identifier check; @@ ops.checkentry = check; @@ identifier rule1.check; @@ check(...) { <... -return true; +return 0; ...> } @@ identifier rule1.check; @@ check(...) { <... -return false; +return -EINVAL; ...> } // </smpl>
Showing the changes to net/netfilter/xt_LED.c (1 of 31 files). Show all
Unified · Split
| @@ -88,12 +88,12 @@ static int led_tg_check(const struct xt_tgchk_param *par) · 87 unmodified lines | ||
| 88 | 88 | |
| 89 | 89 | if (ledinfo->id[0] == '\0') { |
| 90 | 90 | pr_info("No 'id' parameter given.\n"); |
| 91 | − return false; | |
| 91 | + return -EINVAL; | |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | ledinternal = kzalloc(sizeof(struct xt_led_info_internal), GFP_KERNEL); |
| 95 | 95 | if (!ledinternal) |
| 96 | − return false; | |
| 96 | + return -EINVAL; | |
| 97 | 97 | |
| 98 | 98 | ledinternal->netfilter_led_trigger.name = ledinfo->id; |
| 99 | 99 | |
| @@ -111,13 +111,11 @@ static int led_tg_check(const struct xt_tgchk_param *par) · 11 unmodified lines | ||
| 111 | 111 | (unsigned long)ledinfo); |
| 112 | 112 | |
| 113 | 113 | ledinfo->internal_data = ledinternal; |
| 114 | − | |
| 115 | − return true; | |
| 114 | + return 0; | |
| 116 | 115 | |
| 117 | 116 | exit_alloc: |
| 118 | 117 | kfree(ledinternal); |
| 119 | − | |
| 120 | − return false; | |
| 118 | + return -EINVAL; | |
| 121 | 119 | } |
| 122 | 120 | |
| 123 | 121 | static void led_tg_destroy(const struct xt_tgdtor_param *par) |