Re: [PATCH v2 11/16] rerere: let `rerere_path()` write paths into a caller-provided buffer

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

 



Jeff King <peff@xxxxxxxx> writes:

> On Fri, Feb 07, 2025 at 12:03:36PM +0100, Patrick Steinhardt wrote:
>
>>  static timestamp_t rerere_last_used_at(struct rerere_id *id)
>>  {
>> +	struct strbuf buf = STRBUF_INIT;
>>  	struct stat st;
>> +	int ret;
>> +
>> +	ret = stat(rerere_path(&buf, id, "postimage"), &st) ? (time_t) 0 : st.st_mtime;
>>  
>> -	return stat(rerere_path(id, "postimage"), &st) ? (time_t) 0 : st.st_mtime;
>> +	strbuf_release(&buf);
>> +	return ret;
>>  }
>
> This "int ret" should surely be a timestamp_t, no?
>
> -Peff

Indeeeeeed.  Thanks for a careful reading.




[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