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

2018-06-15 Thread Derrick Stolee

On 6/15/2018 11:01 AM, Ramsay Jones wrote:


On 15/06/18 15:30, Derrick Stolee wrote:

Signed-off-by: Derrick Stolee 
---
  ewah/ewah_io.c | 26 --
  ewah/ewok.h|  1 -
  2 files changed, 27 deletions(-)

This duplicates Jeff's patch #3.
Thanks. I got a bit hasty as I was working from 'maint' and didn't 
double-check.


-Stolee


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

2018-06-15 Thread Ramsay Jones



On 15/06/18 15:30, Derrick Stolee wrote:
> Signed-off-by: Derrick Stolee 
> ---
>  ewah/ewah_io.c | 26 --
>  ewah/ewok.h|  1 -
>  2 files changed, 27 deletions(-)

This duplicates Jeff's patch #3.

ATB,
Ramsay Jones


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

2018-06-15 Thread Derrick Stolee
Signed-off-by: Derrick Stolee 
---
 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