ospfd: remove unnecessary space - #21979
Conversation
Remove unnecessary spaces in config written with `interface_config_auth_str()`. Before: ``` interface enp1s0 ip ospf authentication 1.2.3.4 ``` After: ``` interface enp1s0 ip ospf authentication 1.2.3.4 ``` Also, remove trailing one from "area <> virtual-link <> authentication" in this same way. Signed-off-by: anlan_cs <anlan_cs@126.com>
Greptile SummaryThis PR removes a spurious trailing space in
Confidence Score: 5/5Safe to merge β the change is a targeted one-line cosmetic fix with no functional side effects. The fix is minimal and well-scoped: it corrects trailing whitespace in generated OSPF config for simple authentication. Both call sites guard on the return value before using the buffer, so the empty string is handled correctly. No logic is altered beyond the formatting of the emitted config line. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[interface_config_auth_str] --> B{params->auth_type}
B -->|OSPF_AUTH_NOTSET| C[return 0]
B -->|OSPF_AUTH_NULL| D["buf = ' null'\nreturn 1"]
B -->|OSPF_AUTH_SIMPLE| E["buf = '' β
\nreturn 1"]
B -->|OSPF_AUTH_CRYPTOGRAPHIC| F["buf = ' message-digest'\nor ' key-chain NAME'\nreturn 1"]
D --> G[Caller: 'ip ospf authentication null']
E --> H[Caller: 'ip ospf authentication']
F --> I[Caller: 'ip ospf authentication message-digest']
Reviews (1): Last reviewed commit: "ospfd: remove unnecessary space" | Re-trigger Greptile |
|
I'll work on getting this through CI, LGTM |
|
@Mergifyio backport stable/10.6 stable/10.5 stable/10.4 stable/10.3 stable/10.2 |
β Backports have been createdDetails
|
ospfd: remove unnecessary space (backport #21979)
ospfd: remove unnecessary space (backport #21979)
ospfd: remove unnecessary space (backport #21979)
ospfd: remove unnecessary space (backport #21979)
ospfd: remove unnecessary space (backport #21979)
Remove unnecessary spaces in config written with
interface_config_auth_str().Before:
After:
Also, remove trailing one from "area <> virtual-link <> authentication" in this same way.