Re: [PATCH] vcs-svn: Fix some compiler warnings
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 31, 2012, 20:14 UTC
- Message-ID
- <7v8vkn8wa1.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20120131192053.GC12443@burratino>
Jonathan Nieder <jrnieder@gmail.com> writes:
> off_t delta_len = off_t_or_die(len, "enormous delta"); > postimage_len = apply_delta(delta_len, input, ...); > > What do you think?
Another possibility would be to make the "die" part responsibility of the caller of the helper function, e.g.
if (value_out_of_range(off_t, len))
die("enormous delta");which may make the caller easier to follow and the helper easier to reuse.