Remove code path which cannot be executed.
[oweals/opkg-lede.git] / libopkg / pkg_dest.c
index f015dd6dbffa3eed687f660de865d73e55f28f65..b1b502ace75be540d8bb314b70856804b6d4ee2c 100644 (file)
@@ -1,4 +1,4 @@
-/* pkg_dest.c - the itsy package management system
+/* pkg_dest.c - the opkg package management system
 
    Carl D. Worth
 
    General Public License for more details.
 */
 
-#include "opkg.h"
+#include "includes.h"
 
 #include "pkg_dest.h"
 #include "file_util.h"
 #include "str_util.h"
 #include "sprintf_alloc.h"
+#include "opkg_conf.h"
+#include "opkg_cmd.h"
+#include "opkg_defines.h"
+#include "libbb/libbb.h"
 
 int pkg_dest_init(pkg_dest_t *dest, const char *name, const char *root_dir,const char * lists_dir)
 {
-    dest->name = strdup(name);
+    dest->name = xstrdup(name);
 
     /* Guarantee that dest->root_dir ends with a '/' */
     if (str_ends_with(root_dir, "/")) {
-       dest->root_dir = strdup(root_dir);
+       dest->root_dir = xstrdup(root_dir);
     } else {
        sprintf_alloc(&dest->root_dir, "%s/", root_dir);
     }