Hi, On Tue, 29. Nov. 2005 at 09:24:47 +0100, Johannes Schindelin wrote: > Hi, > > On Tue, 29 Nov 2005, Jan Andres wrote: > > > - lock->token = xmalloc(strlen(ctx->cdata - 15)); > > + lock->token = xmalloc(strlen(ctx->cdata) - 15); > > strcpy(lock->token, ctx->cdata + 16); > > Why not > > + lock->token = xmalloc(strlen(ctx->cdata + 16)); Looks more efficient indeed, but wouldn't we have to use + lock->token = xmalloc(strlen(ctx->cdata + 16) + 1); so as to account for the trailing NUL? Regards -- Jan Andres <jandres@gmx.net> - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.htmlReceived on Wed Nov 30 00:36:14 2005
This archive was generated by hypermail 2.1.8 : 2005-11-30 00:36:20 EST