0001-cecloader-h-fix-null-return.patch 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. From 452b2049b2ee3e73968c603e5524b2d349ac0c3e Mon Sep 17 00:00:00 2001
  2. From: psykose <alice@ayaya.dev>
  3. Date: Sat, 9 Apr 2022 17:59:11 +0000
  4. Subject: [PATCH] cecloader.h: fix null return
  5. returning NULL is invalid for a return type of bool when NULL is defined
  6. as `nullptr` instead of 0L
  7. [Retrieved from:
  8. https://github.com/Pulse-Eight/libcec/pull/599/commits/452b2049b2ee3e73968c603e5524b2d349ac0c3e]
  9. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  10. ---
  11. include/cecloader.h | 4 ++--
  12. 1 file changed, 2 insertions(+), 2 deletions(-)
  13. diff --git a/include/cecloader.h b/include/cecloader.h
  14. index be76468f..550f598e 100644
  15. --- a/include/cecloader.h
  16. +++ b/include/cecloader.h
  17. @@ -172,7 +172,7 @@ bool LibCecBootloader(const char *strLib = NULL)
  18. if (!g_libCEC)
  19. {
  20. std::cout << dlerror() << std::endl;
  21. - return NULL;
  22. + return false;
  23. }
  24. }
  25. @@ -181,7 +181,7 @@ bool LibCecBootloader(const char *strLib = NULL)
  26. if (!LibCecBootloader)
  27. {
  28. std::cout << "cannot find CECStartBootloader" << std::endl;
  29. - return NULL;
  30. + return false;
  31. }
  32. bool bReturn = LibCecBootloader();