0005-fix-pointer-comparaison.patch 932 B

123456789101112131415161718192021222324252627282930
  1. Fix pointer comparaison
  2. opt_servers is a pointer, not a boolean, so testing against false to
  3. know if the pointer is NULL no longer works with the more strict gcc
  4. 7.x checks.
  5. [Taken from http://pkgs.fedoraproject.org/cgit/rpms/libmemcached.git/plain/libmemcached-build.patch.]
  6. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  7. diff -up ./clients/memflush.cc.old ./clients/memflush.cc
  8. --- ./clients/memflush.cc.old 2017-02-12 10:12:59.615209225 +0100
  9. +++ ./clients/memflush.cc 2017-02-12 10:13:39.998382783 +0100
  10. @@ -39,7 +39,7 @@ int main(int argc, char *argv[])
  11. {
  12. options_parse(argc, argv);
  13. - if (opt_servers == false)
  14. + if (!opt_servers)
  15. {
  16. char *temp;
  17. @@ -48,7 +48,7 @@ int main(int argc, char *argv[])
  18. opt_servers= strdup(temp);
  19. }
  20. - if (opt_servers == false)
  21. + if (!opt_servers)
  22. {
  23. std::cerr << "No Servers provided" << std::endl;
  24. exit(EXIT_FAILURE);