Update put-getn.c

Sync'd with mdhim-tng