Project

General

Profile

Bug #1364

NULL data containers should make functions fail early

Added by Magnus Lundborg over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
High
Target version:
Affected version - extra info:
Affected version:
Close

Description

If passing a NULL vector to e.g. tng_util_pos_write() it might create data blocks etc. before complaining that there is no data.

History

#1 Updated by Magnus Lundborg over 6 years ago

  • Status changed from Accepted to Closed

This should be OK now. But the functions still return TNG_FAILURE if trying to write a NULL vector - since something probably went wrong. This means that it still makes sense to check the pointer before calling the function or other failures might not be caught. Another alternative would be to ignore failures when writing from GROMACS and just fail when receiving TNG_CRITICAL. However, closing this.

Also available in: Atom PDF