unit: Fix broken SNEP read unit test
[platform/upstream/neard.git] / unit / test-snep-read.c
index 9ce2c1c..cb02054 100644 (file)
@@ -101,11 +101,11 @@ static near_bool_t test_snep_dummy_req_put(int fd, void *data)
        if (stored_recd)
                TEST_SNEP_LOG("\tdummy_req_put already stored record\n");
 
-       test_fragments = g_slist_append(test_fragments, snep_data);
-
        if (snep_data->nfc_data_length > snep_data->nfc_data_current_length)
                return TRUE;
 
+       test_fragments = g_slist_append(test_fragments, snep_data);
+
        nfc_data_length = 0;
        nfc_data = g_try_malloc0(snep_data->nfc_data_length);
        g_assert(nfc_data != NULL);