local.disable-cfr_strerror.patch 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. Description: Disable the cfr_strerror function
  2. Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
  3. Bug: https://bitbucket.org/ripencc/bgpdump/issues/31/
  4. Last-Update: 2016-07-19
  5. This function does not check the asprintf return value but it's not
  6. used anyway. So disable it.
  7. --- a/cfile_tools.c
  8. +++ b/cfile_tools.c
  9. @@ -430,6 +430,7 @@
  10. }
  11. +#if 0
  12. char * cfr_strerror(CFRFILE *stream) {
  13. // Result is "stream-i/o: <stream-error> <compressor>[: <compressor error>]"
  14. // Do not modify result.
  15. @@ -478,6 +479,7 @@
  16. snprintf(res, sizeof(res), "%s", "Error: asprintf: out of memory");
  17. return(res);
  18. }
  19. +#endif
  20. const char * cfr_compressor_str(CFRFILE *stream) {
  21. // Returns the name of the compressor used
  22. --- a/cfile_tools.h
  23. +++ b/cfile_tools.h
  24. @@ -68,7 +68,9 @@
  25. ssize_t cfr_getline(char **lineptr, size_t *n, CFRFILE *stream);
  26. int cfr_eof(CFRFILE *stream);
  27. int cfr_error(CFRFILE *stream);
  28. +#if 0
  29. char * cfr_strerror(CFRFILE *stream);
  30. +#endif
  31. const char * cfr_compressor_str(CFRFILE *stream);
  32. const char * _bz2_strerror(int err);