X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/checkpath/blobdiff_plain/de1bcaacf00696ba09688b51c6c0bbfd8b60d778..de5dde29b9dc4352622975d788133915c7484280:/checkpath.c diff --git a/checkpath.c b/checkpath.c index d874246..440a6ab 100644 --- a/checkpath.c +++ b/checkpath.c @@ -87,9 +87,9 @@ static dstr d = DSTR_INIT; /* Current path string */ static struct elt *splitpath(const char *path, struct elt *tail) { struct elt *head, **ee = &head, *e; + size_t n; while (*path) { - size_t n; /* --- Either a leading `/', or a doubled one --- * * @@ -353,6 +353,7 @@ unsigned checkpath(const char *p, const struct checkpath *cp) struct stat st; unsigned bad = 0; dstr buf = DSTR_INIT; + int i; /* --- Initialize stack pointer and path string --- */ @@ -420,7 +421,6 @@ unsigned checkpath(const char *p, const struct checkpath *cp) /* --- Handle symbolic links specially --- */ if (S_ISLNK(st.st_mode)) { - int i; /* --- Resolve the link --- */