Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More if zero #7974

Merged
merged 13 commits into from
Jan 29, 2021
Merged

More if zero #7974

merged 13 commits into from
Jan 29, 2021

Conversation

donaldsharp
Copy link
Member

lots of #if 0 code in the code base. Remove a large chunk.

The #if 0 code in ospfd, has not been compiled since at least
2012.  If we are at least 9 years old at this point with no effort
to use or save, we should just get rid of it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
The earliest that some of this code is 2018.  There is not
much point in keeping this code around.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Old dead code.
Like a log
jamming your build system

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
rip, ripped out the #if 0 code.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Remove some more dead code.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Looks like the #if 0 code in this place was for ESI support
on solaris.  We do not support solaris anymore.  So let's
remove with prejudice.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Remove all dead #if 0 code from bgpd.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
We do have a bunch of old code that is never used.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
There is some dead code in eigrpd

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Just some more dead code that has been sitting unused for
a very long time.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
I am not even sure what the goal of this code was in any
way shape fashion or form.  But since it's pbr_nht.c
I as the original author should know... But I don't.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
/*
* bpacket_queue_sanity_check
*/
void bpacket_queue_sanity_check(struct bpacket_queue __attribute__((__unused__))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh man - I don't know the specifics here, but I love a sanity check. maybe it could be under some more useful ifdef, so it's not entirely lost? or is it really adding ... nothing?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one didn't even compile anymore.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can put it back, as that I struggled with this one in all honesty. If we are not even taking the time to make sure it works now. What is it going to be like in another year or so?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, you're right - if it's not being maintained, it's not going to be "easy" to turn on and use.

ospfd/ospfd.c Outdated
@@ -2004,29 +1984,9 @@ struct ospf_nbr_nbma *ospf_nbr_nbma_lookup(struct ospf *ospf,
struct ospf_nbr_nbma *ospf_nbr_nbma_lookup_next(struct ospf *ospf,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so ... looks like this api always just returns NULL now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well I would say it's returned NULL since 2002. I go back through and just clean this up a bit more in a sec here.

The calling function of ospf_nbr_nbma_lookup_next calls
this function and then immediately returns when it
gets the NULL.  Just cleanup a bit more code.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Jan 28, 2021

Continuous Integration Result: SUCCESSFUL

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-16810/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Warnings Generated during build:

Checkout code: Successful with additional warnings
Report for if.c | 17 issues
===============================================
< WARNING: strncat() is error-prone; please use strlcat() if possible#874: FILE: /tmp/f1-13206/if.c:874:
---
> WARNING: space prohibited between function name and open parenthesis '('
> #829: FILE: /tmp/f2-13206/if.c:829:
> +				vty_out (vty, "%pFX\n", p);
> 
> WARNING: space prohibited between function name and open parenthesis '('
> #853: FILE: /tmp/f2-13206/if.c:853:
> +		vty_out (vty, "\nVRF %s(%u)\n\n",
> 
> WARNING: space prohibited between function name and open parenthesis '('
> #861: FILE: /tmp/f2-13206/if.c:861:
> +					vty_out (vty, "%pFX\n", p);
> 
> WARNING: strncat() is error-prone; please use strlcat() if possible#938: FILE: /tmp/f2-13206/if.c:938:
66c78
< #964: FILE: /tmp/f1-13206/if.c:964:
Report for ospf6_abr.c | 4 issues
===============================================
< WARNING: braces {} are not necessary for single statement blocks
< #173: FILE: /tmp/f1-13206/ospf6_abr.c:173:
< WARNING: braces {} are not necessary for single statement blocks
< #178: FILE: /tmp/f1-13206/ospf6_abr.c:178:

Warnings Generated during build:

Debian 10 amd64 build: Successful with additional warnings

Debian Package lintian failed for Debian 10 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-16810/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.5.0.3 (current is 4.3.0)
W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.5.0.3 (current is 4.3.0)
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 7.5-0 -> 7.7-dev-20210128-14-gd3e3a408d-0 (missing) -> 7.7-dev-20210128-14-gd3e3a408d-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 7.5-0 -> 7.7-dev-20210128-14-gd3e3a408d-0 (missing) -> 7.7-dev-20210128-14-gd3e3a408d-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 7.5-0 -> 7.7-dev-20210128-14-gd3e3a408d-0 (missing) -> 7.7-dev-20210128-14-gd3e3a408d-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 7.5-0 -> 7.7-dev-20210128-14-gd3e3a408d-0 (missing) -> 7.7-dev-20210128-14-gd3e3a408d-0~deb10u1
W: frr-doc: changelog-file-missing-explicit-entry 7.5-0 -> 7.7-dev-20210128-14-gd3e3a408d-0 (missing) -> 7.7-dev-20210128-14-gd3e3a408d-0~deb10u1

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-16811/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Warnings Generated during build:

Checkout code: Successful with additional warnings
Report for if.c | 17 issues
===============================================
< WARNING: strncat() is error-prone; please use strlcat() if possible#874: FILE: /tmp/f1-9617/if.c:874:
---
> WARNING: space prohibited between function name and open parenthesis '('
> #829: FILE: /tmp/f2-9617/if.c:829:
> +				vty_out (vty, "%pFX\n", p);
> 
> WARNING: space prohibited between function name and open parenthesis '('
> #853: FILE: /tmp/f2-9617/if.c:853:
> +		vty_out (vty, "\nVRF %s(%u)\n\n",
> 
> WARNING: space prohibited between function name and open parenthesis '('
> #861: FILE: /tmp/f2-9617/if.c:861:
> +					vty_out (vty, "%pFX\n", p);
> 
> WARNING: strncat() is error-prone; please use strlcat() if possible#938: FILE: /tmp/f2-9617/if.c:938:
66c78
< #964: FILE: /tmp/f1-9617/if.c:964:
Report for ospf6_abr.c | 4 issues
===============================================
< WARNING: braces {} are not necessary for single statement blocks
< #173: FILE: /tmp/f1-9617/ospf6_abr.c:173:
< WARNING: braces {} are not necessary for single statement blocks
< #178: FILE: /tmp/f1-9617/ospf6_abr.c:178:

Warnings Generated during build:

Debian 10 amd64 build: Successful with additional warnings

Debian Package lintian failed for Debian 10 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-16811/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.5.0.3 (current is 4.3.0)
W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.5.0.3 (current is 4.3.0)
W: frr: changelog-file-missing-explicit-entry 7.5-0 -> 7.7-dev-20210128-15-g153bdb3d0-0 (missing) -> 7.7-dev-20210128-15-g153bdb3d0-0~deb10u1
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 7.5-0 -> 7.7-dev-20210128-15-g153bdb3d0-0 (missing) -> 7.7-dev-20210128-15-g153bdb3d0-0~deb10u1
W: frr-doc: changelog-file-missing-explicit-entry 7.5-0 -> 7.7-dev-20210128-15-g153bdb3d0-0 (missing) -> 7.7-dev-20210128-15-g153bdb3d0-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 7.5-0 -> 7.7-dev-20210128-15-g153bdb3d0-0 (missing) -> 7.7-dev-20210128-15-g153bdb3d0-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 7.5-0 -> 7.7-dev-20210128-15-g153bdb3d0-0 (missing) -> 7.7-dev-20210128-15-g153bdb3d0-0~deb10u1

@LabN-CI
Copy link
Collaborator

LabN-CI commented Jan 29, 2021

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/7974 153bdb3
Date 01/28/2021
Start 23:09:45
Finish 23:49:05
Run-Time 39:20
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2021-01-28-23:09:45.txt
Log autoscript-2021-01-28-23:10:48.log.bz2
Memory 505 504 427

For details, please contact louberger

@ton31337 ton31337 merged commit 6772501 into FRRouting:master Jan 29, 2021
@donaldsharp donaldsharp deleted the more_if_zero branch June 23, 2021 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants