ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/liblzf/lzf_c.c
(Generate patch)

Comparing liblzf/lzf_c.c (file contents):
Revision 1.35 by root, Sat Aug 30 06:43:38 2008 UTC vs.
Revision 1.36 by root, Fri May 1 00:30:53 2009 UTC

168 /* match found at *ref++ */ 168 /* match found at *ref++ */
169 unsigned int len = 2; 169 unsigned int len = 2;
170 unsigned int maxlen = in_end - ip - len; 170 unsigned int maxlen = in_end - ip - len;
171 maxlen = maxlen > MAX_REF ? MAX_REF : maxlen; 171 maxlen = maxlen > MAX_REF ? MAX_REF : maxlen;
172 172
173 if (expect_false (op + 3 + 1 >= out_end)) /* first a faster conservative test */
174 if (op - !lit + 3 + 1 >= out_end) /* second the exact but rare test */
175 return 0;
176
173 op [- lit - 1] = lit - 1; /* stop run */ 177 op [- lit - 1] = lit - 1; /* stop run */
174 op -= !lit; /* undo run if length is zero */ 178 op -= !lit; /* undo run if length is zero */
175
176 if (expect_false (op + 3 + 1 >= out_end))
177 return 0;
178 179
179 for (;;) 180 for (;;)
180 { 181 {
181 if (expect_true (maxlen > 16)) 182 if (expect_true (maxlen > 16))
182 { 183 {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines