X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=daemon%2Futils.c;fp=daemon%2Futils.c;h=c006b4f872afd3b2c3cb47dfc437e6cf5f09d13b;hb=732471142064666ef8defeb70ad82281e9cbea4a;hp=216ae771af770b268d1e600961997bb5d80e9ab6;hpb=d72b557161cb62387d2d6b0311fa664ba09d1655;p=doldaconnect.git 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)