Passing NULL to argument 3 of mysql_fetch_object has undefined behavior and is not functionally equal to not passing a 3rd argument.