Guillaume Delacour, le Thu 04 Sep 2014 11:01:28 +0200, a écrit : > I've tested this and the asprintf() call is not correct
Ah, sure, the whole point was to drop the PATH_MAX use :) > (and i've just added a return control on the call): > > - char rcfile[PATH_MAX]; > - snprintf(rcfile, PATH_MAX, "%s/.hpingrc", home); > - rcfile[PATH_MAX-1] = '\0'; > + char *rcfile; > + if (asprintf(&rcfile, "%s/.hpingrc", home) < 0) > + return NULL; See the prototype of the function: it returns an int, not a poitner. And see above, it returns TCL_ERROR on error. > Tcl_EvalFile(interp, rcfile); > Tcl_ResetResult(interp); > + free(rcfile); > > Thanks for your time. > > > > > Samuel > > -- > Guillaume Delacour <[email protected]> -- Samuel <s> cool, j'ai un rapport a rendre pour le 31 decembre a minuit... -+- #ens-mim - bonne année ! -+- -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: https://lists.debian.org/[email protected]

