rem: if (when != 0) { return TCL_OK; } else { return TCL_ERROR; }
add: RegisterFilterObj(itPtr, when, objc - 2, objv + 2); return TCL_OK;
context: NsTclRegisterFilterObjCmd(ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]){    NsInterp *itPtr = arg;    int       lobjc;    Tcl_Obj **lobjv;    int       when, i;    if (objc != 5 && objc != 6) {        Tcl_WrongNumArgs(interp, 1, objv, "when method urlPattern script ?arg?");        return TCL_ERROR;    }	if (Tcl_ListObjGetElements(interp, objv[1], &lobjc, &lobjv) != TCL_OK) {	return TCL_ERROR;    }    when = 0;    if (lobjc == 0) {	Tcl_SetResult(interp, "blank filter when specification", TCL_STATIC);    } else {        for (i = 0; i < lobjc; ++i) {            if (STREQ(Tcl_GetString(lobjv[i]), "preauth")) {                when |= NS_FILTER_PRE_AUTH;            } else if (STREQ(Tcl_GetString(lobjv[i]), "postauth")) {                when |= NS_FILTER_POST_AUTH;            } else if (STREQ(Tcl_GetString(lobjv[i]), "trace")) {                when |= NS_FILTER_TRACE;            } else {		Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "unknown when \"", 			Tcl_GetString(lobjv[i]),			"\": should be preauth, postauth, or trace", NULL);                when = 0;                break;            }        }        if (when) {            RegisterFilterObj(itPtr, when, objv + 2);        }    }    if (when != 0) {	return TCL_OK;    } else {	return TCL_ERROR;    }}