Re: 'git fast-export' is crashing on the gcc repo

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

 



Nicolas Pitre, Tue, Dec 11, 2007 23:06:42 +0100:
> 
> Well, ignore the above.  It seems that most of stdio doesn't set errno 
> so the above is crap.
> 

Well, it had no reason to in this case. It's not an error.
It does not even have to do a syscall.

> diff --git a/builtin-fast-export.c b/builtin-fast-export.c
> index 2136aad..c32a124 100755
> --- a/builtin-fast-export.c
> +++ b/builtin-fast-export.c
> @@ -103,7 +103,7 @@ static void handle_object(const unsigned char *sha1)
>  	mark_object(object);
>  
>  	printf("blob\nmark :%d\ndata %lu\n", last_idnum, size);
> -	if (fwrite(buf, size, 1, stdout) != 1)
> +	if (fwrite(buf, 1, size, stdout) != size)

That's a probable syscall which could be spared

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

  Powered by Linux