Abu Dawud Book 1, Hadith Number 176.

Chapter : A man who is sure of purification but doubts that something has rendered it invalid.

Narated By ‘Abbad b. Tamim from his uncle : A person made a complaint to the Prophet (PBUH) that he entertained (doubt) as if something had happened to him which had rendered his ablution invalid. He (the Prophet) said: He should nor cease (to pray) unless he hears a sound or perceives a smell (of passing wind).