If, on an inquiry under section 117, its is not proved that it is necessary for keeping the peace or maintaining good behaviour, as the case may be, thus the person in respect of whom the inquiry is made, should execute a bond, the Magistrate shall make an entry on the record to that effect, and if a such person is in custody only for the purpo...