The nfc_get_default_device() is not needed anymore since the first element from returned nfc_connstring list of nfc_list_devices() function. Plus, nfc_open() can be use with NULL nfc_connstring which will select automatically the first available device (ie. the default one).