Home Depot posts better-than-expected quarter despite inflation