From 50f9ee989f89fd47a5f554d9967e8abedd6bd938 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sat, 29 Apr 2023 22:54:42 -0400 Subject: dirent: Remove test code --- (limited to 'src') diff --git a/src/dirent.c b/src/dirent.c index 52e8f84..7783120 100644 --- a/src/dirent.c +++ b/src/dirent.c @@ -116,37 +116,3 @@ opkg_opk_dirent_full_name(struct opkg_opk_dirent *dirent) *cur = '\0'; return name; } - -int -main() -{ - struct opkg_opk_dirent foo = { - .name = "foo", - .parent = NULL, - }; - struct opkg_opk_dirent bar = { - .name = "bar", - .parent = &foo, - }; - char *full_name; - char name[5]; - char pref[5]; - - full_name = opkg_opk_dirent_full_name(&bar); - if (full_name == NULL) { - puts("Error building full name"); - return EXIT_FAILURE; - } - puts(full_name); - free(full_name); - - if (opkg_opk_dirent_name_prefix(&bar, name, 5, pref, 5) != OPKG_OPK_OK) - { - puts("Error building name parts"); - return EXIT_FAILURE; - } - puts(name); - puts(pref); - - return EXIT_SUCCESS; -} -- cgit v0.9.1