On 28.01.2014 00:31, Dan McGee wrote:
>> +static int handle_simple_path(alpm_pkg_t *pkg, const char *path)
>> +{
>> + if(strcmp(path, ".INSTALL") == 0) {
>> + pkg->scriptlet = 1;
>> + } else {
>> + return 0;
>> + }
>> +
>> + return 1;
>>
> This felt a little weird to read and understand the flow. Why not just
> `return 1` from in the if block, drop the else completely, and return 0 at
> the end of the function?The idea was to make it easy to expand to more files (no need to remember to add returns), but I guess YAGNI and yeah not really readable. Will be fixed in the next patch.
signature.asc
Description: OpenPGP digital signature
