Dangerfield, 82, underwent brain surgery last year to reduce his chances of having a stroke during the heart operation.
Asked how long he would remain in the hospital after Wednesday's operation, he said: "If things go right, I'll be there about a week, and if things don't go right, I'll be there about an hour and a half."
The comic and actor, best known for his self-mocking line, "I don't get no respect," recently released his autobiography, "It's Not Easy Being Me: A Lifetime of No Respect but Plenty of Sex and Drugs."
Dangerfield's films include "Back to School" and "Caddyshack." He is set to guest star on the sitcom "Still Standing" this fall and will be heard as himself in the animated comedy "The Family Guy."
A television movie based on his autobiography is also planned.