From: fredrik Date: Sat, 15 Oct 2005 00:17:34 +0000 (+0000) Subject: Fix getetcpath. X-Git-Tag: 0.1~216 X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=732471142064666ef8defeb70ad82281e9cbea4a;p=doldaconnect.git Fix getetcpath. git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/doldaconnect@359 959494ce-11ee-0310-bf91-de5d638817bd --- 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)