SHANGHAI (AP) -- Novak Djokovic survived a scare when he landed awkwardly on his right foot but recovered for a 6-2, 6-0 victory over Spain's Marcel Granollers in the Shanghai Masters on Wednesday.
Roger Federer had fewer problems in his second-round match, rebounding from an early break to defeat Andreas Seppi of Italy 6-4, 6-3.
Djokovic hit a running backhand in the first game of the second set and then leaped in the air, wincing in pain. He called for a medical timeout after the game to have his foot wrapped and appeared slightly tentative after returning to the court, not bothering to chase after a couple of shots.
The Serb dominated the rest of the match, however, closing it out in 70 minutes to set up a third-round match with Italian Fabio Fognini, who advanced when Spaniard Tommy Robredo retired with a wrist injury while trailing 7-6 (3), 2-1.
Djokovic said the problem wasn't serious, without elaborating about where specifically he felt the pain.
''It was just an awkward movement,'' he said. ''I was running and I made a quick movement that caused a sharp pain. It's all good now.''
Federer, the fifth seed, had more unforced errors (29) than winners (19) in his first match since a fourth-round loss at the U.S. Open, but he made quick work of the 22nd-ranked Seppi.
He next plays Frenchman Gael Monfils, with a possible quarterfinal with Djokovic looming.
Fourth-seeded Tomas Berdych rebounded from a back injury sustained in the semifinals of the China Open last week to defeat Feliciano Lopez 7-6 (5), 6-2. He said after his last match he could barely stand or walk when he retired against Rafael Nadal.
''I wouldn't say (my back is) 100 percent, but I decided I was competitive enough to go on court and try to play,'' he said. ''Looks like it was a smart decision.''
Juan Martin del Potro fought through pain, as well, though his was from illness, not injury. He overcame a fever and 50 winners from big-hitting German Philipp Kohlschreiber to advance 3-6, 6-3, 7-6 (4).
After the match, del Potro said he started feeling sick on Tuesday night and relied on his serve to win the match because running was difficult.
The Argentine withdrew from the doubles to rest for his next match against 11th-seeded Tommy Haas, a 6-4, 6-4 winner over German compatriot Daniel Brands.
''Maybe tomorrow I will be feeling better. I hope so, because my match is going to be harder than today,'' he said.
Both del Potro and Berdych have a lot to play for this week - they're trying to wrap up their spots in the elite ATP Finals in London, a task made slightly easier by the withdrawal on Wednesday of Andy Murray, who is recovering from back surgery.
Del Potro and Berdych would make the eight-man field by making the final in Shanghai.
Federer needs to do a bit more work - he's in seventh place in the standings, with a number of players within striking distance.
In other matches, seventh-seeded Jo-Wilfried Tsonga advanced with a 6-3, 6-2 win over Spain's Pablo Andujar, while American John Isner was ousted by Argentine Carlos Berlocq 6-4, 7-6 (4).
Nadal, the new No. 1, played late Wednesday.