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

[deadbeef] Remove dead code #1200

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

alejandro-colomar
Copy link
Collaborator

@alejandro-colomar alejandro-colomar commented Jan 29, 2025

One of the benefits of rewriting a lot of code, is finding dead code that can be removed. :-)

Cc: @thesamesam


Revisions:

v2
  • Delete another round of dead code.
$ git range-diff master gh/deadbeef deadbeef 
1:  28a46878 = 1:  28a46878 lib/, src/, doc/: Remove dead code
2:  5064c6b4 = 2:  5064c6b4 lib/pwauth.*: PW_{ADD,CHANGE,DELETE,FTP,REXEC}: Remove dead code
-:  -------- > 3:  17e7da68 lib/, src/, doc/: Remove pw_auth()'s  as dead code
v2b
  • tfix in commit message
$ git range-diff master gh/deadbeef deadbeef 
1:  28a46878 = 1:  28a46878 lib/, src/, doc/: Remove dead code
2:  5064c6b4 = 2:  5064c6b4 lib/pwauth.*: PW_{ADD,CHANGE,DELETE,FTP,REXEC}: Remove dead code
3:  17e7da68 ! 3:  a66b4a9c lib/, src/, doc/: Remove pw_auth()'s  as dead code
    @@ Metadata
     Author: Alejandro Colomar <[email protected]>
     
      ## Commit message ##
    -    lib/, src/, doc/: Remove pw_auth()'s  as dead code
    +    lib/, src/, doc/: Remove pw_auth()'s $3 as dead code
     
         We don't read the parameter at all.  Remove it.
     

Copy link
Contributor

@thesamesam thesamesam left a comment

Choose a reason for hiding this comment

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

Nice!

pw_auth()'s $4 was always being specified as NULL.  Remove the
parameter.  Instead, set a local variable to NULL at function entry, and
remove code that never runs (conditional on $4 != NULL).

Reviewed-by: Sam James <[email protected]>
Signed-off-by: Alejandro Colomar <[email protected]>
These values aren't being set anywhere.

Reviewed-by: Sam James <[email protected]>
Signed-off-by: Alejandro Colomar <[email protected]>
@alejandro-colomar
Copy link
Collaborator Author

Nice!

Thanks!

I've taken that as a Reviewed-by. ;)

Cheers,
Alex

$ git range-diff master gh/deadbeef deadbeef 
1:  e938d475 ! 1:  28a46878 lib/, src/, doc/: Remove dead code
    @@ Commit message
         parameter.  Instead, set a local variable to NULL at function entry, and
         remove code that never runs (conditional on $4 != NULL).
     
    +    Reviewed-by: Sam James <[email protected]>
         Signed-off-by: Alejandro Colomar <[email protected]>
     
      ## doc/HOWTO ##
2:  76bf1c3f ! 2:  5064c6b4 lib/pwauth.*: PW_{ADD,CHANGE,DELETE,FTP,REXEC}: Remove dead code
    @@ Commit message
     
         These values aren't being set anywhere.
     
    +    Reviewed-by: Sam James <[email protected]>
         Signed-off-by: Alejandro Colomar <[email protected]>
     
      ## lib/pwauth.c ##

@alejandro-colomar alejandro-colomar marked this pull request as ready for review January 29, 2025 21:26
We don't read the parameter at all.  Remove it.

As a consequence, all the PW_* constants are also removed (as they are
now unused).

Signed-off-by: Alejandro Colomar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants