don't need buffer w/o getcwd

This commit is contained in:
dwarning 2008-01-02 18:34:03 +00:00
parent 280580cb36
commit c3badfd017
1 changed files with 6 additions and 5 deletions

View File

@ -3,10 +3,9 @@
* $Id$
************/
#include <config.h>
#include <ngspice.h>
#include "ngspice.h"
#include <wordlist.h>
#include "wordlist.h"
#ifdef HAVE_PWD_H
#include <pwd.h>
@ -24,7 +23,9 @@ com_chdir(wordlist *wl)
#ifdef HAVE_PWD_H
struct passwd *pw;
#endif
#ifdef HAVE_GETCWD
char localbuf[257];
#endif
int copied = 0;
s = NULL;
@ -50,8 +51,8 @@ com_chdir(wordlist *wl)
if (s != NULL)
if (chdir(s) == -1)
perror(s);
if (chdir(s) == -1)
perror(s);
if (copied)
tfree(s);