fix the rule function sample: add va_end() before return