Re: [GSoC][PATCH v5 02/20] rebase -i: rewrite append_todo_help() in C

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

 



Hi Phillip,

Le 07/08/2018 à 15:57, Phillip Wood a écrit :
>> +	if (ret < 0)
>> +		error_errno(_("could not append help text to '%s'"), rebase_path_todo());
>> +
>> +	fclose(todo);
> 
> You should definitely check the return value and return an error if
> appropriate as fputs() might not actually write any data until you try
> and close the file.
> 

Is this worth a reroll, as this goes away in a later patch (refactored
in 08/20, removed in 12/20)?

> Best Wishes
> 
> Phillip
> 
>> +	strbuf_release(&buf);
>> +
>> +	return ret;
>> +}
>> diff --git a/rebase-interactive.h b/rebase-interactive.h
>> new file mode 100644
>> index 0000000000..47372624e0
>> --- /dev/null
>> +++ b/rebase-interactive.h
>> @@ -0,0 +1,6 @@
>> +#ifndef REBASE_INTERACTIVE_H
>> +#define REBASE_INTERACTIVE_H
>> +
>> +int append_todo_help(unsigned edit_todo, unsigned keep_empty);
>> +
>> +#endif
>>
> 

Cheers,
Alban




[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]

  Powered by Linux