We therefore compared patients with HCAP , hospital-acquired pneumonia ( HAP ) , and ventilator-associated pneumonia ( VAP ) enrolled in a trial comparing linezolid with vancomycin for treatment of pneumonia .