OTL, there was a big reduction in both countries militaries and their relations were good from 1949 uptil the 1960's.
@michael1 is mistaken when he says that Pakistan wished to maintain a powerful Army. OTL, after 1950 2 Divisions were disbanded (6 and 9) and of the remaining 6 divisions, all but one was reduced to 7 battalions each.
You also have to consider
1) The problem with Afghanistan was never the military threat, rather it was the threat within. The two Afghan military offensives in 1950 and 1961 were trounced easily.. And United India would have done exactly what Pakistan did (and the UK before it) to Afghanistan's border area, which was bomb the tribes when they got irritating.
2) Afghanistan played the Pashtunustan card heavily. Pakistan managed to contain it. Afghanistan would have played a similar card. And unlike Pakistan, which was a Muslim country, India would have been faced with a border region which hated the central Governments guts for being Hindu. Fertile places for rebellion and USSR support for Afghanistan.
3) No partition also butterflies two things which worked in Pakistan's favour. Firstly, the area which constituted Pakistan was by far the poorest area in the Sub-Continent. They had about 3 power houses for instance. Pakistan has spent a lot of time and effort developing agriculture and industry. The poverty rate was 70% in 1947 and closer to 9% in 2010. The Punjab and Frontier regions will not see similar amounts of development as they did historically because it will be a religiously and ethnically distinct area and probably one in regular rebellion. The second issue is the demographic and cultural one. The area is heavily Persianised with locals having long standing links to Iran and Afghanistan. No Partition means no influx of Muslim refugees from rest of India, who had no such sentiment and mistrusted Afghans and who also dominated the Government for the first three decades.