From d2fc8c73ad1cff0e8b57330caa3c997a17059f2b Mon Sep 17 00:00:00 2001 From: graham.gower Date: Wed, 25 Nov 2009 20:42:53 -0500 Subject: Remove str_util.{c,h} git-svn-id: http://opkg.googlecode.com/svn/trunk@383 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358 --- (limited to 'libopkg/pkg_dest.c') diff --git a/libopkg/pkg_dest.c b/libopkg/pkg_dest.c index 083f97c..adc5e1f 100644 --- a/libopkg/pkg_dest.c +++ b/libopkg/pkg_dest.c @@ -19,7 +19,6 @@ #include "pkg_dest.h" #include "file_util.h" -#include "str_util.h" #include "sprintf_alloc.h" #include "opkg_conf.h" #include "opkg_cmd.h" @@ -31,7 +30,7 @@ int pkg_dest_init(pkg_dest_t *dest, const char *name, const char *root_dir,const dest->name = xstrdup(name); /* Guarantee that dest->root_dir ends with a '/' */ - if (str_ends_with(root_dir, "/")) { + if (root_dir[strlen(root_dir) -1] == '/') { dest->root_dir = xstrdup(root_dir); } else { sprintf_alloc(&dest->root_dir, "%s/", root_dir); @@ -42,7 +41,7 @@ int pkg_dest_init(pkg_dest_t *dest, const char *name, const char *root_dir,const dest->root_dir, OPKG_STATE_DIR_PREFIX); file_mkdir_hier(dest->opkg_dir, 0755); - if (str_starts_with (lists_dir, "/")) + if (lists_dir[0] == '/') sprintf_alloc(&dest->lists_dir, "%s", lists_dir); else sprintf_alloc(&dest->lists_dir, "/%s", lists_dir); -- cgit v0.9.1