David Barr wrote: > Maybe rename to check_offset_overflow to make it explicit? Ok, here's the patch I'll squash in. ;-) diff --git i/vcs-svn/sliding_window.c w/vcs-svn/sliding_window.c index 2f4ae60f..ec2707c9 100644 --- i/vcs-svn/sliding_window.c +++ w/vcs-svn/sliding_window.c @@ -31,7 +31,7 @@ static int read_to_fill_or_whine(struct line_buffer *file, return 0; } -static int check_overflow(off_t offset, uintmax_t len) +static int check_offset_overflow(off_t offset, uintmax_t len) { if (len > maximum_signed_value_of_type(off_t)) return error("unrepresentable length in delta: " @@ -48,9 +48,9 @@ int move_window(struct sliding_view *view, off_t off, size_t width) off_t file_offset; assert(view); assert(view->width <= view->buf.len); - assert(!check_overflow(view->off, view->buf.len)); + assert(!check_offset_overflow(view->off, view->buf.len)); - if (check_overflow(off, width)) + if (check_offset_overflow(off, width)) return -1; if (off < view->off || off + width < view->off + view->width) return error("invalid delta: window slides left"); -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html