From 25c1c9be88f92d4398167d5b0bc5a799c21d92e6 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 21 Sep 2019 12:54:59 +0100 Subject: [PATCH] buffer: Abolish unused `flags' 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 --- secnet.h | 1 - util.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/secnet.h b/secnet.h index eb8bf0c..5b1e24b 100644 --- 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 2ce3ade..6f4854f 100644 --- 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; -- 2.30.2