remove useless new lines

This commit is contained in:
anon
2024-11-10 13:00:51 +01:00
parent a9e505d11c
commit cffb1763b4
7 changed files with 0 additions and 13 deletions

View File

@ -81,20 +81,17 @@ char *compress_path(char *pathname) /*FDEF*/
/*
* do not change the path if it has no "/"
*/
if(strchr(pathname, '/') == NULL) return (pathname);
/*
* find all strings consisting of more than one '/'
*/
for(lastchar = pathname + 1; *lastchar != '\0'; lastchar++)
if((*lastchar == '/') && (*(lastchar - 1) == '/')) {
/*
* find the character after the last slash
*/
nextchar = lastchar;
while(*++lastchar == '/') { }
@ -102,7 +99,6 @@ char *compress_path(char *pathname) /*FDEF*/
* eliminate the extra slashes by copying
* everything after the slashes over the slashes
*/
sofar = nextchar;
while((*nextchar++ = *lastchar++) != '\0')
;
@ -112,7 +108,6 @@ char *compress_path(char *pathname) /*FDEF*/
/*
* find all strings of "./"
*/
for(lastchar = pathname + 1; *lastchar != '\0'; lastchar++)
if((*lastchar == '/') && (*(lastchar - 1) == '.') &&
((lastchar - 1 == pathname) || (*(lastchar - 2) == '/'))) {
@ -120,7 +115,6 @@ char *compress_path(char *pathname) /*FDEF*/
/*
* copy everything after the "./" over the "./"
*/
nextchar = lastchar - 1;
sofar = nextchar;
while((*nextchar++ = *++lastchar) != '\0')