cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3753 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
85e35e67a2
commit
19cb1e6de6
|
@ -584,8 +584,8 @@ void read_file(FILE *f, const char *filename)
|
||||||
* reading with a 0 return value. *f is set to the opened file. */
|
* reading with a 0 return value. *f is set to the opened file. */
|
||||||
int open_file(const char *filename, bool newfie, FILE **f)
|
int open_file(const char *filename, bool newfie, FILE **f)
|
||||||
{
|
{
|
||||||
int fd;
|
|
||||||
struct stat fileinfo;
|
struct stat fileinfo;
|
||||||
|
int fd;
|
||||||
|
|
||||||
assert(filename != NULL && f != NULL);
|
assert(filename != NULL && f != NULL);
|
||||||
|
|
||||||
|
@ -911,14 +911,12 @@ char *get_full_path(const char *origpath)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
/* Get the current directory. If it doesn't exist, back up and try
|
/* Get the current directory. If it doesn't exist, back up and try
|
||||||
* again until we get a directory that does exist. */
|
* again until we get a directory that does. */
|
||||||
d_here = charalloc(PATH_MAX + 1);
|
d_here = charalloc(PATH_MAX + 1);
|
||||||
d_here = getcwd(d_here, PATH_MAX + 1);
|
d_here = getcwd(d_here, PATH_MAX + 1);
|
||||||
|
|
||||||
while (d_here == NULL) {
|
while (d_here == NULL) {
|
||||||
if (chdir("..") == -1)
|
chdir("..");
|
||||||
break;
|
|
||||||
|
|
||||||
d_here = getcwd(d_here, PATH_MAX + 1);
|
d_here = getcwd(d_here, PATH_MAX + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue