Re: [PATCH] remove unuseful MALLOC/REALLOC/STRDUP/FREE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2021-11-26 at 16:37 +0800, lixiaokeng wrote:
> Now there are tools such as valgrind and asan to detect memory leaks,
> so it is unnecessary to use _DEBUG_. Remove _DEBUG_ code.
> 
> Signed-off-by: Lixiaokeng<lixiaokeng@xxxxxxxxxx>
> ---
>  libmpathpersist/mpath_persist.c          |   4 +-
>  libmpathpersist/mpath_updatepr.c         |   1 -
>  libmultipath/Makefile                    |   2 +-
>  libmultipath/alias.c                     |   2 +-
>  libmultipath/blacklist.c                 |  27 +-
>  libmultipath/checkers.c                  |   4 +-
>  libmultipath/checkers.h                  |   4 +-
>  libmultipath/checkers/emc_clariion.c     |   3 +-
>  libmultipath/config.c                    |  85 +++--
>  libmultipath/configure.c                 |  21 +-
>  libmultipath/defaults.c                  |   1 -
>  libmultipath/defaults.h                  |   1 +
>  libmultipath/devmapper.c                 |  15 +-
>  libmultipath/dict.c                      |  49 ++-
>  libmultipath/discovery.c                 |   1 -
>  libmultipath/dmparser.c                  |  47 ++-
>  libmultipath/io_err_stat.c               |  13 +-
>  libmultipath/log.c                       |  22 +-
>  libmultipath/log_pthread.c               |   2 -
>  libmultipath/memory.c                    | 444 -----------------------
>  libmultipath/memory.h                    |  66 ----
>  libmultipath/parser.c                    |  25 +-
>  libmultipath/pgpolicies.c                |   5 +-
>  libmultipath/prio.c                      |   4 +-
>  libmultipath/prio.h                      |   1 -
>  libmultipath/prioritizers/path_latency.c |   6 +-
>  libmultipath/prioritizers/weightedpath.c |   1 -
>  libmultipath/propsel.c                   |  11 +-
>  libmultipath/structs.c                   |  51 ++-
>  libmultipath/sysfs.c                     |   2 +-
>  libmultipath/uevent.c                    |  13 +-
>  libmultipath/util.c                      |   7 +-
>  libmultipath/util.h                      |   1 +
>  libmultipath/uxsock.c                    |   5 +-
>  libmultipath/vector.c                    |  15 +-
>  multipath/main.c                         |  19 +-
>  multipathd/cli.c                         |  23 +-
>  multipathd/cli.h                         |   2 +-
>  multipathd/cli_handlers.c                |   7 +-
>  multipathd/main.c                        |  33 +-
>  multipathd/uxclnt.c                      |   5 +-
>  multipathd/uxlsnr.c                      |  17 +-
>  multipathd/waiter.c                      |   5 +-
>  tests/pgpolicy.c                         |   1 +
>  tests/uevent.c                           |   8 +-
>  45 files changed, 268 insertions(+), 813 deletions(-)
>  delete mode 100644 libmultipath/memory.c
>  delete mode 100644 libmultipath/memory.h
> 
>                         }
> diff --git a/libmultipath/io_err_stat.c b/libmultipath/io_err_stat.c
> index d8d91f64..b74a9131 100644
> --- a/libmultipath/io_err_stat.c
> +++ b/libmultipath/io_err_stat.c
> @@ -22,9 +22,9 @@
>  #include <errno.h>
>  #include <sys/mman.h>
>  #include <sys/select.h>
> +#include <stdio.h>

AFAICS, this #include is unnecessary.

I'll remove this, apply the change mentioned in my previous post, and
push to the queue branch
(https://github.com/openSUSE/multipath-tools/tree/queue).

Regards
Martin




--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/dm-devel





[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux