are always false. I'm keeping them as assertions for documentation purposes.
The proof is left as exercise to the reader.
Hint: use conditions on lines 307 and 311 and the fact that old_len and
old_arg are both unsigned entities.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14778
SSizeT needL = new_len - old_len;
vg_assert(needL > 0);
- if (needA == 0)
- goto eINVAL;
- /* VG_(am_get_advisory_client_simple) interprets zero to mean
- non-fixed, which is not what we want */
+ vg_assert(needA > 0);
+
advised = VG_(am_get_advisory_client_simple)( needA, needL, &ok );
if (ok) {
/* Fixes bug #129866. */
{
Addr needA = old_addr + old_len;
SizeT needL = new_len - old_len;
- if (needA == 0)
- goto eINVAL;
- /* VG_(am_get_advisory_client_simple) interprets zero to mean
- non-fixed, which is not what we want */
+
+ vg_assert(needA > 0);
+
advised = VG_(am_get_advisory_client_simple)( needA, needL, &ok );
if (ok) {
/* Fixes bug #129866. */