2009/4/29 Junio C Hamano <gitster@xxxxxxxxx>: > + > + if (S_ISGITLINK(mode)) { > + blob = xmalloc(100); > + *size = snprintf(blob, 100, > + "Subproject commit %s\n", sha1_to_hex(sha1)); snprintf returns a signed value. It also has a bad record of returning negative values for obscure reasons (on obscure platforms, admittedly). For this particular case, strcpy(blob, "Subproject commit "); strcat(blob, sha1_to_hex(sha1)); strcat(blob, "\n"); *size = strlen(blob); /* that's a constant */ could be considered. -- 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