Containment and war are two different things. We absolutely worked every bit as hard to contain China as Russia; which has nothing to do with Mac being told not to go to war with China over Korea. His mission was to contain, he wanted to do more and got fired.
The containment policy was directed at the USSR, we tried to pull China into our sphere to help contain the USSR. The USSR did aggressively expand (using force), and continued to do so, so our containment policy was appropriate. Where exactly did China try to expand to that we needed to contain it? China is expanding its influence far beyond its borders now, and an argument could be made that China is trying to contain us.

War and containment may be different, or it war may be a sequential step to implement containment, the point of the quote was that U.S. leaders didn't view China as an enemy. China's actions in North Korea and North Vietnam were in response to U.S. actions, they were not expanding in those situations.

Red China was immoral, it murdered millions of its own citizens, it was bankrupt, there is nothing good to say about it, but I can't find any evidence that were containing it, and the only reason is it wasn't expanding.