don't need buffer w/o getcwd
This commit is contained in:
parent
280580cb36
commit
c3badfd017
|
|
@ -3,10 +3,9 @@
|
||||||
* $Id$
|
* $Id$
|
||||||
************/
|
************/
|
||||||
|
|
||||||
#include <config.h>
|
#include "ngspice.h"
|
||||||
#include <ngspice.h>
|
|
||||||
|
|
||||||
#include <wordlist.h>
|
#include "wordlist.h"
|
||||||
|
|
||||||
#ifdef HAVE_PWD_H
|
#ifdef HAVE_PWD_H
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
|
|
@ -24,7 +23,9 @@ com_chdir(wordlist *wl)
|
||||||
#ifdef HAVE_PWD_H
|
#ifdef HAVE_PWD_H
|
||||||
struct passwd *pw;
|
struct passwd *pw;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_GETCWD
|
||||||
char localbuf[257];
|
char localbuf[257];
|
||||||
|
#endif
|
||||||
int copied = 0;
|
int copied = 0;
|
||||||
|
|
||||||
s = NULL;
|
s = NULL;
|
||||||
|
|
@ -50,8 +51,8 @@ com_chdir(wordlist *wl)
|
||||||
|
|
||||||
|
|
||||||
if (s != NULL)
|
if (s != NULL)
|
||||||
if (chdir(s) == -1)
|
if (chdir(s) == -1)
|
||||||
perror(s);
|
perror(s);
|
||||||
|
|
||||||
if (copied)
|
if (copied)
|
||||||
tfree(s);
|
tfree(s);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue