diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-04-21 05:42:18 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-04-21 05:42:18 +0000 |
commit | 24243b2b7a93b99a78c620d79c5448fb79d490e7 (patch) | |
tree | 8083d3ebebd170a1f1f7d193d470755418bde2ee | |
parent | 6f7d3c9d5b4cbe2a3b79f88c6eb62d80c0e52803 (diff) | |
download | openocd_libswd-24243b2b7a93b99a78c620d79c5448fb79d490e7.tar.gz openocd_libswd-24243b2b7a93b99a78c620d79c5448fb79d490e7.tar.bz2 openocd_libswd-24243b2b7a93b99a78c620d79c5448fb79d490e7.tar.xz openocd_libswd-24243b2b7a93b99a78c620d79c5448fb79d490e7.zip |
Zach Welch <zw@superlucidity.net> fix unused return value warnings (2 of 4)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1486 b42882b7-edfa-0310-969c-e2dbd0fdcd60
-rw-r--r-- | src/helper/jim.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/helper/jim.c b/src/helper/jim.c index a43bcbd6..5eb8c0bb 100644 --- a/src/helper/jim.c +++ b/src/helper/jim.c @@ -133,7 +133,9 @@ static char buf[2048]; buf[sizeof(buf)-1] = 0; #else char *buf; - vasprintf( &buf, fmt, ap ); + int result; + result = vasprintf( &buf, fmt, ap ); + if (result < 0) exit(-1); #endif return buf; } @@ -8953,7 +8955,7 @@ int Jim_EvalFile(Jim_Interp *interp, const char *filename) const int cwd_len=2048; char *cwd=malloc(cwd_len); Jim_SetResult(interp, Jim_NewEmptyStringObj(interp)); - getcwd( cwd, cwd_len ); + if (!getcwd( cwd, cwd_len )) strcpy(cwd, "unknown"); Jim_AppendStrings(interp, Jim_GetResult(interp), "Error loading script \"", filename, "\"", " cwd: ", cwd, |