git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Support empty blob in fsck --lost-found

From
BJ Hargrave <bj@bjhargrave.com>
Date
Sep 11, 2011, 21:43 UTC
Message-ID
<348F09EE-5EE2-4F3E-B1B1-6FD34BDBD117@bjhargrave.com>
In-Reply-To
<7vty8iolnj.fsf@alter.siamese.dyndns.org>
On Sep 11, 2011, at 16:43 , Junio C Hamano wrote:
Show 10 quoted lines
> Funny.
> 
> I am sure we fixed a similar breakage elsewhere a few years ago, by
> swapping the size and nmemb to the calls (i.e. instead of writing one
> block of "size" bytes, you could write "size" blocks of 1-byte) and making
> sure fwrite() reports the number of items. IOW
> 
> 	if (buf && fwrite(buf, 1, size, f) != size)
> 		die_errno("Could not write '%s'", filename);
> 
Do you want me to resubmit the patch using this technique instead of the size > 0 check?
-- 
BJ
Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 7 in “Support empty blob in fsck --lost-found”
  1. Support empty blob in fsck --lost-foundBJ Hargrave, Sep 11, 2011
  2. Sverre RabbelierSep 11, 2011
  3. BJ HargraveSep 11, 2011
  4. Sverre RabbelierSep 11, 2011
  5. Junio C HamanoSep 11, 2011
  6. BJ HargraveSep 11, 2011
  7. Junio C HamanoSep 12, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.