git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 8/8] ewah_io: delete unused 'ewah_serialize_native()'

From
Derrick Stolee <dstolee@microsoft.com>
Date
Jun 15, 2018, 14:30 UTC
Message-ID
<20180615143018.170686-9-dstolee@microsoft.com>
In-Reply-To
<20180615143018.170686-1-dstolee@microsoft.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
---
 ewah/ewah_io.c | 26 --------------------------
 ewah/ewok.h    |  1 -
 2 files changed, 27 deletions(-)
diff --git a/ewah/ewah_io.c b/ewah/ewah_io.c
index 86d3f1d02e..dde736bcd9 100644
--- a/ewah/ewah_io.c
+++ b/ewah/ewah_io.c
@@ -20,32 +20,6 @@
 #include "ewok.h"
 #include "strbuf.h"
 
-int ewah_serialize_native(struct ewah_bitmap *self, int fd)
-{
-	uint32_t write32;
-	size_t to_write = self->buffer_size * 8;
-
-	/* 32 bit -- bit size for the map */
-	write32 = (uint32_t)self->bit_size;
-	if (write(fd, &write32, 4) != 4)
-		return -1;
-
-	/** 32 bit -- number of compressed 64-bit words */
-	write32 = (uint32_t)self->buffer_size;
-	if (write(fd, &write32, 4) != 4)
-		return -1;
-
-	if (write(fd, self->buffer, to_write) != to_write)
-		return -1;
-
-	/** 32 bit -- position for the RLW */
-	write32 = self->rlw - self->buffer;
-	if (write(fd, &write32, 4) != 4)
-		return -1;
-
-	return (3 * 4) + to_write;
-}
-
 int ewah_serialize_to(struct ewah_bitmap *self,
 		      int (*write_fun)(void *, const void *, size_t),
 		      void *data)
diff --git a/ewah/ewok.h b/ewah/ewok.h
index 1055706e44..8a2b334278 100644
--- a/ewah/ewok.h
+++ b/ewah/ewok.h
@@ -86,7 +86,6 @@ void ewah_free(struct ewah_bitmap *self);
 int ewah_serialize_to(struct ewah_bitmap *self,
 		      int (*write_fun)(void *out, const void *buf, size_t len),
 		      void *out);
-int ewah_serialize_native(struct ewah_bitmap *self, int fd);
 int ewah_serialize_strbuf(struct ewah_bitmap *self, struct strbuf *);
 
 int ewah_deserialize(struct ewah_bitmap *self, int fd);
-- 
2.18.0.rc1
Previous: Derrick StoleeNext: Ramsay Jones
Message 23 of 58 in “security: potential out-of-bound read at ewah_io.c |ewah_read_mmap|”
  1. Luat NguyenJun 14, 2018
  2. Jeff KingJun 15, 2018
  3. 1/3 ewah_read_mmap: bounds-check mmap readsJeff King, Jun 15, 2018
  4. SZEDER GáborJun 15, 2018
  5. Junio C HamanoJun 15, 2018
  6. SZEDER GáborJun 15, 2018
  7. Jeff KingJun 15, 2018
  8. Junio C HamanoJun 15, 2018
  9. Junio C HamanoJun 15, 2018
  10. Jeff KingJun 15, 2018
  11. Junio C HamanoJun 15, 2018
  12. SZEDER GáborJun 16, 2018
  13. Jeff KingJun 16, 2018
  14. 2/3 ewah: drop ewah_deserialize functionJeff King, Jun 15, 2018
  15. 3/3 ewah: drop ewah_serialize_native functionJeff King, Jun 15, 2018
  16. Ramsay JonesJun 15, 2018
  17. Ramsay JonesJun 15, 2018
  18. 0/8 Delete unused methods in EWAH bitmapDerrick Stolee, Jun 15, 2018
  19. 2/8 ewah/bitmap.c: delete unused 'bitmap_each_bit()'Derrick Stolee, Jun 15, 2018
  20. Ramsay JonesJun 15, 2018
  21. 4/8 ewah_bitmap: delete unused 'ewah_and_not()'Derrick Stolee, Jun 15, 2018
  22. 6/8 ewah_bitmap: delete unused 'ewah_or()'Derrick Stolee, Jun 15, 2018
  23. 8/8 ewah_io: delete unused 'ewah_serialize_native()'Derrick Stolee, Jun 15, 2018
  24. Ramsay JonesJun 15, 2018
  25. Derrick StoleeJun 15, 2018
  26. 1/8 ewah/bitmap.c: delete unused 'bitmap_clear()'Derrick Stolee, Jun 15, 2018
  27. Ramsay JonesJun 15, 2018
  28. Derrick StoleeJun 15, 2018
  29. 7/8 ewah_io: delete unused 'ewah_serialize()'Derrick Stolee, Jun 15, 2018
  30. 3/8 ewah_bitmap: delete unused 'ewah_and()'Derrick Stolee, Jun 15, 2018
  31. 5/8 ewah_bitmap: delete unused 'ewah_not()'Derrick Stolee, Jun 15, 2018
  32. Derrick StoleeJun 15, 2018
  33. 0/7 Delete unused methods in EWAH bitmapDerrick Stolee, Jun 15, 2018
  34. 1/7 ewah/bitmap.c: delete unused 'bitmap_clear()'Derrick Stolee, Jun 15, 2018
  35. 2/7 ewah/bitmap.c: delete unused 'bitmap_each_bit()'Derrick Stolee, Jun 15, 2018
  36. 3/7 ewah_bitmap: delete unused 'ewah_and()'Derrick Stolee, Jun 15, 2018
  37. 4/7 ewah_bitmap: delete unused 'ewah_and_not()'Derrick Stolee, Jun 15, 2018
  38. 7/7 ewah_io: delete unused 'ewah_serialize()'Derrick Stolee, Jun 15, 2018
  39. 5/7 ewah_bitmap: delete unused 'ewah_not()'Derrick Stolee, Jun 15, 2018
  40. 6/7 ewah_bitmap: delete unused 'ewah_or()'Derrick Stolee, Jun 15, 2018
  41. Junio C HamanoJun 15, 2018
  42. Derrick StoleeJun 15, 2018
  43. Junio C HamanoJun 15, 2018
  44. Jeff KingJun 15, 2018
  45. Derrick StoleeJun 15, 2018
  46. Jeff KingJun 15, 2018
  47. Junio C HamanoJun 15, 2018
  48. Jeff KingJun 15, 2018
  49. 4/3 ewah: adjust callers of ewah_read_mmap()Jeff King, Jun 15, 2018
  50. Derrick StoleeJun 15, 2018
  51. Junio C HamanoJun 15, 2018
  52. Jeff KingJun 15, 2018
  53. Derrick StoleeJun 15, 2018
  54. Jeff KingJun 15, 2018
  55. Junio C HamanoJun 15, 2018
  56. Junio C HamanoJun 15, 2018
  57. Dyer, EdwinJun 19, 2018
  58. Jeff KingJun 19, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.