diff mbox series

var: Remove unused VNOSET

Message ID ZheVVMDfOsWg/Ihu@gondor.apana.org.au (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show
Series var: Remove unused VNOSET | expand

Commit Message

Herbert Xu April 11, 2024, 7:46 a.m. UTC
The bit VNOSET is no longer used.  Remove it.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
diff mbox series

Patch

diff --git a/src/var.c b/src/var.c
index 6f85be3..895eabc 100644
--- a/src/var.c
+++ b/src/var.c
@@ -267,9 +267,6 @@  struct var *setvareq(char *s, int flags)
 				 n);
 		}
 
-		if (flags & VNOSET)
-			goto out;
-
 		if (vp->func && (flags & VNOFUNC) == 0)
 			(*vp->func)(varnull(s));
 
@@ -291,8 +288,6 @@  out_free:
 
 		flags |= vp->flags & bits;
 	} else {
-		if (flags & VNOSET)
-			goto out;
 		if ((flags & (VEXPORT|VREADONLY|VSTRFIXED|VUNSET)) == VUNSET)
 			goto out_free;
 		/* not found */
diff --git a/src/var.h b/src/var.h
index aa7575a..953a694 100644
--- a/src/var.h
+++ b/src/var.h
@@ -48,7 +48,7 @@ 
 #define VSTACK		0x10	/* text is allocated on the stack */
 #define VUNSET		0x20	/* the variable is not set */
 #define VNOFUNC		0x40	/* don't call the callback function */
-#define VNOSET		0x80	/* do not set variable - just readonly test */
+/* #define VNOSET	0x80	   do not set variable - just readonly test */
 #define VNOSAVE		0x100	/* when text is on the heap before setvareq */