summaryrefslogtreecommitdiffstats
path: root/libopkg/pkg_dest.c
diff options
context:
space:
mode:
authorgraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2009-11-25 20:42:53 (EST)
committer graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2009-11-25 20:42:53 (EST)
commitd2fc8c73ad1cff0e8b57330caa3c997a17059f2b (patch)
treeda202a65f58455cbb2a2a9c484627502c5a61d9b /libopkg/pkg_dest.c
parent9ba412631e57deb365d5e7fb8b8c2fbf9bfe27b0 (diff)
Remove str_util.{c,h}
git-svn-id: http://opkg.googlecode.com/svn/trunk@383 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libopkg/pkg_dest.c')
-rw-r--r--libopkg/pkg_dest.c5
1 files changed, 2 insertions, 3 deletions
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);