| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
quintuple negation into one with a simple negation.
From miod, ok millert
|
|
|
|
| |
From miod@, OK tb@
|
|
|
|
|
|
|
| |
Changing it from ((condition) || function call) to an if() wrapped
in a do/while is easier to read and more stylistically consistent.
The seterr() function no longer needs to return a value.
From miod@, OK tb@
|
|
|
|
| |
From miod@, OK tb@
|
|
|
|
|
| |
Also, the temporary array in nonnewline() can be made static const.
From miod@, OK tb@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"count" bytes available in an array of char "start" and "end" both point
to.
This is fine, unless "start + count" goes beyond the last element of the
array. In this case, pedantic interpretation of the C standard makes
the comparison of such a pointer against "end" undefined, and optimizers
from hell will happily remove as much code as possible because of this.
An example of this occurs in regcomp.c's bothcases(), which defines
bracket[3], sets "next" to "bracket" and "end" to "bracket + 2". Then it
invokes p_bracket(), which starts with "if (p->next + 5 < p->end)"...
Because bothcases() and p_bracket() are static functions in regcomp.c,
there is a real risk of miscompilation if aggressive inlining happens.
The following diff rewrites the "start + count < end" constructs into
"end - start > count". Assuming "end" and "start" are always pointing in
the array (such as "bracket[3]" above), "end - start" is well-defined
and can be compared without trouble.
As a bonus, MORE2() implies MORE() therefore SEETWO() can be simplified
a bit.
from miod, ok millert
|
|
|
|
|
|
| |
dealing with it. This code was incomplete anyway.
from miod, ok millert
|
|
|
|
| |
from miod, ok millert
|
|
|
|
| |
ok millert@ deraadt@
|
| |
|
|
|
|
|
|
|
|
| |
When an invalid regular expression is passed, seterr() is called which
sets p->error to the appropriate error code and sets p->next and
p->end to nuls[]. However, p->next is decremented in the default
case in p_ere_exp() and p_simp_re() which makes it point to one
byte before nuls[]. From FreeBSD. OK tedu@ deraadt@
|
| |
|
|
|
|
|
|
| |
MUSTEAT.
ok tom@
|
|
|
|
|
|
|
| |
expressions generated by the REQUIRE() macro. Thus eliminating from build
output 100 lines or so of gcc complaints about "computed but not used".
cluebat & ok tom@
|
|
|
|
|
|
|
| |
or prototypes. Ditto for some of the char* and void* casts too.
verified no change to instructions on ILP32 (i386) and LP64 (amd64)
ok natano@ abluhm@ deraadt@ millert@
|
|
|
|
| |
ok and valuable input from millert@
|
| |
|
|
|
|
| |
ok doug millert
|
|
|
|
|
|
| |
because such support is reportedly common and in somewhat wide use.
undocumented for now because we don't endorse this.
ok jsg millert
|
| |
|
| |
|
|
|
|
| |
appropriate. in regex, stop using the struct hack for a fixed size array
|
|
|
|
| |
netbsd; ok deraadt@
|
| |
|
|
|
|
|
| |
pointer, so add a safety-net. From Gianluigi Tiesi via Torok Edwin.
ok chl@ millert@
|
|
|
|
|
|
|
|
|
|
|
| |
use a simpler way to allocated memory in allocset, mostly done by
replacing malloc/realloc dance, by only one realloc
add comments about variables that are not used uninitialized, even
if gcc told the contrary
another malloc/realloc -> realloc change
Work initially started by otto@, and then I joined him
ok otto@ ray@
|
| |
|
| |
|
| |
|
|
|
|
| |
parameter names from prototypes. ok millert@
|
| |
|
|
|
|
|
|
| |
also fix a memory leak in error path.
ok millert@
|
|
|
|
|
|
| |
regcmp.c rev 1.13.
ok deraadt@
|
|
|
|
| |
rescinded 22 July 1999. Proofed by myself and Theo.
|
|
|
|
| |
ok tedu@, hints by deraadt@ and millert@
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
- move an assert to be *before* a strcpy() where it can do some good.
- integrate NetBSD fixes for 64-bit machines (NetBSD PR #3450, Ross Harvey)
- add lite2 tags
|
|
|
|
|
|
| |
Remove unused variables
Silence some warnings
lint(1) is your friend
|
|
|
|
| |
Make sure everything uses {SYS,}LIBC_SCCS properly
|
|
|