common: Check read errors in name-value.c