OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.5 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../ebtables/ebtables-2.0.10-2-remove-unused-ret-var.patch
  5. # Copyright (C) 2011 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. --- ebtables-v2.0.10-2/communication.c.orig 2011-11-28 00:04:02.936104275 +0100
  17. +++ ebtables-v2.0.10-2/communication.c 2011-11-28 00:07:17.076104276 +0100
  18. @@ -256,7 +256,7 @@
  19. static int store_counters_in_file(char *filename, struct ebt_u_replace *repl)
  20. {
  21. - int size = repl->nentries * sizeof(struct ebt_counter), ret = 0;
  22. + int size = repl->nentries * sizeof(struct ebt_counter);
  23. unsigned int entries_size;
  24. struct ebt_replace hlp;
  25. FILE *file;
  26. @@ -272,13 +272,11 @@
  27. sizeof(unsigned int) ||
  28. fseek(file, entries_size + sizeof(struct ebt_replace), SEEK_SET)) {
  29. ebt_print_error("File %s is corrupt", filename);
  30. - ret = -1;
  31. goto close_file;
  32. }
  33. if (fwrite(repl->counters, sizeof(char), size, file) != size) {
  34. ebt_print_error("Could not write everything to file %s",
  35. filename);
  36. - ret = -1;
  37. }
  38. close_file:
  39. fclose(file);