Re: [PATCH 13/21] Collect skipping of header field names and calculation of line lengths in one place

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

 



Hi,

On Sat, 9 Jun 2007, Johan Herland wrote:

> +	/*
> +	 * Advance header field pointers past their initial identifier.
> +	 * Calculate lengths of header fields.
> +	 */
> +	type_line += strlen("type ");
> +	type_len   = tag_line - type_line - 1;
> +	tag_line  += strlen("tag ");
> +	tag_len    = tagger_line - tag_line - 1;
> +
>  	/* Get the actual type */
> -	type_len = tag_line - type_line - strlen("type \n");
>  	if (type_len >= sizeof(type))
>  		return error("Tag object (@ char " PD_FMT "): "
> -			"Type too long", type_line + 5 - data);
> -	memcpy(type, type_line + 5, type_len);
> +			"Type too long", type_line - data);
> +	memcpy(type, type_line, type_len);

This change does not clarify anything. It is exactly as confusing as 
before.

> -		for (i = 4;;) {
> +		for (i = 0;;) {

I know you introduced this in another patch. This is an ugly construct. If 
you want people to review your patches, you might as well put in the 
effort to make the reviewing more pleasant.

Ciao,
Dscho

-
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