From: Junio C Hamano Date: Tue, 31 Jan 2012 20:14:14 GMT Subject: Re: [PATCH] vcs-svn: Fix some compiler warnings Message-ID: <7v8vkn8wa1.fsf@alter.siamese.dyndns.org> In-Reply-To: <20120131192053.GC12443@burratino> Jonathan Nieder 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.