Sure, that will work.
You could also set the ResetFlag to YES, and just read CMCON in the handler.
Typically, the handler would read CMCON anyway by testing the state of either the C1OUT or C2OUT bits so it can respond to the current state of the comparators.
Right now you're just toggling an LED, so you have to read CMCON separately to end the mismatch condition.
Once you actually do something in the comparator handler, you probably won't need the VAR1 = CMCON statement anymore.
<br>
Bookmarks