diff options
author | dwmalone <dwmalone@FreeBSD.org> | 2008-02-09 09:12:02 +0000 |
---|---|---|
committer | dwmalone <dwmalone@FreeBSD.org> | 2008-02-09 09:12:02 +0000 |
commit | 61bc7e9048ebb34f39561b8d4d27617996bfb776 (patch) | |
tree | 38656dcb8b2bba08e2797f1f8971c6ba6e82b602 /usr.bin/sed/compile.c | |
parent | 7e24637c24d89a152b59a841be37492eb89f6306 (diff) | |
download | FreeBSD-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.c | 2 |
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) |