[SECNET PATCH 01/14] buffer: Abolish unused `flags'

Ian Jackson ijackson at chiark.greenend.org.uk
Sat Sep 21 17:07:46 BST 2019


This variable is never examined.

This has the comment `How paranoid should we be?' but in fact the
paranoia level (such as it is) is set by which entrypoint we call.  It
would not be appropriate to make this a buffer property anyway.

Signed-off-by: Ian Jackson <ijackson at chiark.greenend.org.uk>
---
 secnet.h | 1 -
 util.c   | 2 --
 2 files changed, 3 deletions(-)

diff --git a/secnet.h b/secnet.h
index 818e946..dac2ca7 100644
--- a/secnet.h
+++ b/secnet.h
@@ -643,7 +643,6 @@ struct hash_if {
 struct buffer_if {
     bool_t free;
     cstring_t owner; /* Set to constant string */
-    uint32_t flags; /* How paranoid should we be? */
     struct cloc loc; /* Where we were defined */
     uint8_t *base;
     uint8_t *start;
diff --git a/util.c b/util.c
index d12db66..09cd6ad 100644
--- a/util.c
+++ b/util.c
@@ -348,7 +348,6 @@ void buffer_new(struct buffer_if *buf, int32_t len)
 {
     buf->free=True;
     buf->owner=NULL;
-    buf->flags=0;
     buf->loc.file=NULL;
     buf->loc.line=0;
     buf->size=0;
@@ -361,7 +360,6 @@ void buffer_readonly_view(struct buffer_if *buf, const void *data, int32_t len)
 {
     buf->free=False;
     buf->owner="READONLY";
-    buf->flags=0;
     buf->loc.file=NULL;
     buf->loc.line=0;
     buf->size=buf->alloclen=len;
-- 
2.11.0




More information about the sgo-software-discuss mailing list