Re: XtRemoveTimeOut() with value of 0 accvios under 7.3-2, but not



Hoff Hoffman wrote:
All the code I
have ever seen which uses XtAppAddTimeOut either validates the timer
or has a safety check for zero.

"Validate the timer?"
Is there an Xt...() function that can validate the timer?

Is the timer null? If it is, it's not valid, and it's a bug in the calling code.

Does the calling code stackdump when the caller passes in a bogus argument value? If so, then that is a bug in the called code, and secondary to the bug in the calling code.

Can we spend our time validating stuff further? Sure. I've been
....

Hoff, checking for a non-zero value will not guarantee that the timer is valid; it might be uninitialized data or the code might not have set it back to 0 after calling XtRemoveTimeOut().

Is there a function I can call to validate the timer?

If I'm going to change this code, I want to change it *once* and do it *correctly*. If there's a function available to validate, then I should be calling *that*.

Jeez.

.