summaryrefslogtreecommitdiffstats
path: root/usr.bin/sed/compile.c
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2008-02-09 09:12:02 +0000
committerdwmalone <dwmalone@FreeBSD.org>2008-02-09 09:12:02 +0000
commit61bc7e9048ebb34f39561b8d4d27617996bfb776 (patch)
tree38656dcb8b2bba08e2797f1f8971c6ba6e82b602 /usr.bin/sed/compile.c
parent7e24637c24d89a152b59a841be37492eb89f6306 (diff)
downloadFreeBSD-src-61bc7e9048ebb34f39561b8d4d27617996bfb776.zip
FreeBSD-src-61bc7e9048ebb34f39561b8d4d27617996bfb776.tar.gz
WARNS fixes:
1) Add missing parens around assignment that is compared to zero. 2) Make some variables that only take non-negative values unsigned. 3) Some casts/type changes to fix other constness warnings. 4) Make one variable a const char *. 5) Make sure termwidth is positive, it doesn't make sense for it to be negative. Approved by: dds
Diffstat (limited to 'usr.bin/sed/compile.c')
-rw-r--r--usr.bin/sed/compile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/sed/compile.c b/usr.bin/sed/compile.c
index 635e058..2e3a2ce 100644
--- a/usr.bin/sed/compile.c
+++ b/usr.bin/sed/compile.c
@@ -443,7 +443,7 @@ compile_re(char *re, int case_insensitive)
flags |= REG_ICASE;
if ((rep = malloc(sizeof(regex_t))) == NULL)
err(1, "malloc");
- if (eval = regcomp(rep, re, flags) != 0)
+ if ((eval = regcomp(rep, re, flags)) != 0)
errx(1, "%lu: %s: RE error: %s",
linenum, fname, strregerror(eval, rep));
if (maxnsub < rep->re_nsub)
OpenPOWER on IntegriCloud