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