Skip to content

Commit

Permalink
lib-sieve: util: realpath: Fix indentation problems.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanbosch committed Feb 5, 2018
1 parent 764925e commit 721b2af
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/lib-sieve/util/realpath.c
Expand Up @@ -73,8 +73,8 @@ static int path_normalize(const char *path, bool resolve_links,
seglen = segend - p;
if (seglen == 1 && p[0] == '.') {
/* a reference to this segment; nothing to do */
} else if (seglen == 2 && p[0] == '.' && p[1] == '.') {
/* a reference to parent segment; back up to previous slash */
} else if (seglen == 2 && p[0] == '.' && p[1] == '.') {
/* a reference to parent segment; back up to previous slash */
if (npath_pos > npath + 1) {
if (*(npath_pos-1) == '/')
npath_pos--;
Expand Down Expand Up @@ -201,9 +201,9 @@ static int path_normalize(const char *path, bool resolve_links,
}

/* remove any trailing slash */
if (npath_pos > npath + 1 && *(npath_pos-1) == '/')
npath_pos--;
*npath_pos = '\0';
if (npath_pos > npath + 1 && *(npath_pos-1) == '/')
npath_pos--;
*npath_pos = '\0';

t_buffer_alloc(npath_pos - npath + 1);
*npath_r = npath;
Expand Down

0 comments on commit 721b2af

Please sign in to comment.