From 90e41fc40afb9eaa3aa18274b6bf9989bc912c6e Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Sat, 2 Feb 2002 07:06:58 +0000 Subject: [PATCH] %.* takes an int, not a size_t. --- bin/sh/var.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/sh/var.c b/bin/sh/var.c index 099d4c55db1c..297b82b626e3 100644 --- a/bin/sh/var.c +++ b/bin/sh/var.c @@ -295,6 +295,7 @@ void setvareq(char *s, int flags) { struct var *vp, **vpp; + int len; if (aflag) flags |= VEXPORT; @@ -302,7 +303,7 @@ setvareq(char *s, int flags) for (vp = *vpp ; vp ; vp = vp->next) { if (varequal(s, vp->text)) { if (vp->flags & VREADONLY) { - size_t len = strchr(s, '=') - s; + len = strchr(s, '=') - s; error("%.*s: is read only", len, s); } INTOFF;