getopt: move optreset into function
getopt: move optreset into function

ifduyue/libusual,rabbitt/libusual,ifduyue/libusual,rabbitt/libusual,mgjv/libusual,mgjv/libusual,ifduyue/libusual,rabbitt/libusual,markokr/libusual,rabbitt/libusual,ifduyue/libusual,markokr/libusual,mgjv/libusual,mgjv/libusual,markokr/libusual,markokr/libusual