From 732471142064666ef8defeb70ad82281e9cbea4a Mon Sep 17 00:00:00 2001 From: fredrik Date: Sat, 15 Oct 2005 00:17:34 +0000 Subject: [PATCH] Fix getetcpath. git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/doldaconnect@359 959494ce-11ee-0310-bf91-de5d638817bd --- daemon/utils.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/daemon/utils.c b/daemon/utils.c index 216ae77..c006b4f 100644 --- a/daemon/utils.c +++ b/daemon/utils.c @@ -676,13 +676,19 @@ int _parrlen(void **arr) char *getetcpath(char *binpath) { + int f; char *etcpath, *p; size_t etcpathsize, etcpathdata; etcpath = NULL; etcpathsize = etcpathdata = 0; + f = 1; do { + if(f) + f = 0; + else + binpath++; for(p = binpath; *p && (*p != ':'); p++); for(; (p >= binpath) && (*p != '/'); p--); if(p >= binpath) -- 2.11.0