Re: [PATCH 1/2] Added use of xmalloc() on diff-delta.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



These two functions, create_delta_index() and create_delta(),
are already nicely libified.  They allow the caller to deal with
oom condition.  The caller may die(), or it may decide to
continue its operation with reduced functionality without using
delta data.  A good example of this is found a few lines after
the lines the second patch touches.  When create_delta() cannot
find memory to work with, the entire function returns 0, saying
"sorry, cannot deltify these two", which would cause the object
stored without deltification.

These patches take that nice property away, making libification
more difficult, which is the downside.  Is there an upside?

If anything, I suspect that the part that calls die() you
touched in the second patch could return NULL.

-
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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]