chiark / gitweb /
buffer: Abolish unused `flags'
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 21 Sep 2019 11:54:59 +0000 (12:54 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 24 Oct 2019 18:16:17 +0000 (19:16 +0100)
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@chiark.greenend.org.uk>
secnet.h
util.c

index eb8bf0cc011fc883980f90226f7fe7c90e56122d..5b1e24b402fff7bb8c3426425bb937ae93fdb3f4 100644 (file)
--- a/secnet.h
+++ b/secnet.h
@@ -659,7 +659,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 2ce3ade37e1228b2effe9f84671dd1efdc0eb76d..6f4854f8a010207783b8d41ccb1be8e714b011fe 100644 (file)
--- a/util.c
+++ b/util.c
@@ -365,7 +365,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;
@@ -378,7 +377,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;