Most countries in the world, except for the US, UK and Canada, do not require a visa if you land in the countries just for transiting purpose. Vietnam is one of these countries, and does not require any transit visa, as long as you plan to stay inside the airport.
Note, however, international airports such as Hanoi and Danang are rather small and not the best places for a light-sleeper. Therefore if you have an over-night transit, you might want to exit the airport and stay at a nearby hotel. In those cases, you will need a normal single entry visa.