Recent Global Posts wpdb->prepare error

function get_post_types() {
global $wpdb;

$sql = $wpdb->prepare( "SELECT post_type FROM " . $wpdb->base_prefix . "site_posts GROUP BY post_type" );

$results = $wpdb->get_col( $sql );

return $results;
}

Needs to be updated and fixed so the warning goes away. Should be:

function get_post_types() {
global $wpdb;

$sql = $wpdb->prepare( "SELECT post_type FROM %ssite_posts GROUP BY post_type", $wpdb->base_prefix );

$results = $wpdb->get_col( $sql );

return $results;
}