diff options
author | Alejandro Colomar <alx@kernel.org> | 2023-11-02 18:13:22 +0100 |
---|---|---|
committer | Alejandro Colomar <alx@kernel.org> | 2023-11-03 01:08:15 +0100 |
commit | b93de355779f548e47cfcd5e05c1cb36b32a399a (patch) | |
tree | cbc58e8496eff3712654689366496c258c28cdb4 | |
parent | f1cfd2fb9e21da7c7fa46e6b7aa7769963bb0a41 (diff) |
bin/grepc: Simplify (remove grepc_use())
Signed-off-by: Alejandro Colomar <alx@kernel.org>
-rwxr-xr-x | bin/grepc | 41 |
1 files changed, 15 insertions, 26 deletions
@@ -18,7 +18,6 @@ t_func_glibc_proto='no'; t_func_glibc_def='no'; t_macro='no'; t_type='no'; -t_use='no'; t_use_enum='no'; t_use_func='no'; t_use_macro='no'; @@ -101,7 +100,10 @@ grepc_parse_cmd() t_type='yes'; ;; u) - t_use='yes'; + t_use_enum='yes'; + t_use_func='yes'; + t_use_macro='yes'; + t_use_type='yes'; ;; ue) t_use_enum='yes'; @@ -444,15 +446,6 @@ grepc_use_type() } -grepc_use() -{ - grepc_use_enum "$1"; - grepc_use_func "$1"; - grepc_use_macro "$1"; - grepc_use_type "$1"; -} - - grepc_search() { if [ "$t_enum" = 'yes' ]; then @@ -482,21 +475,17 @@ grepc_search() if [ "$t_type" = 'yes' ]; then grepc_type "$1"; fi; - if [ "$t_use" = 'yes' ]; then - grepc_use "$1"; - else - if [ "$t_use_enum" = 'yes' ]; then - grepc_use_enum "$1"; - fi; - if [ "$t_use_func" = 'yes' ]; then - grepc_use_func "$1"; - fi; - if [ "$t_use_macro" = 'yes' ]; then - grepc_use_macro "$1"; - fi; - if [ "$t_use_type" = 'yes' ]; then - grepc_use_type "$1"; - fi; + if [ "$t_use_enum" = 'yes' ]; then + grepc_use_enum "$1"; + fi; + if [ "$t_use_func" = 'yes' ]; then + grepc_use_func "$1"; + fi; + if [ "$t_use_macro" = 'yes' ]; then + grepc_use_macro "$1"; + fi; + if [ "$t_use_type" = 'yes' ]; then + grepc_use_type "$1"; fi; } |