aboutsummaryrefslogtreecommitdiff
path: root/jim-file.c
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2010-01-24 11:12:50 +1000
committerSteve Bennett <steveb@workware.net.au>2010-10-15 11:02:41 +1000
commit571fa65a6f3cf1c0a11d8c3b46440fe8457fa6fb (patch)
tree407ada47686556fb16198c99b3c61ea595bdb6bd /jim-file.c
parent2d8564100c86466b71408b24a4c6932ec942e7c5 (diff)
downloadjimtcl-571fa65a6f3cf1c0a11d8c3b46440fe8457fa6fb.zip
jimtcl-571fa65a6f3cf1c0a11d8c3b46440fe8457fa6fb.tar.gz
jimtcl-571fa65a6f3cf1c0a11d8c3b46440fe8457fa6fb.tar.bz2
Build improvements, bug fixes and compiler warnings
Remove unimplemented 'after restart|expire' from eventloop Allow libjim to be build as a shared library On some platforms, regex.h needs stdlib.h first Use ualarm() only for times < 1 second Fix warnings found by clang static analyser *: printf/syslog %m isn't portable *: some variables set but never read *: some possible null pointer references (although mostly impossible) *: also minor fixes to jim unit tests Fix 'syslog -options <n>' Must null terminate readlink() result
Diffstat (limited to 'jim-file.c')
-rw-r--r--jim-file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/jim-file.c b/jim-file.c
index f87ba7f..fdecccf 100644
--- a/jim-file.c
+++ b/jim-file.c
@@ -478,6 +478,7 @@ static int file_cmd_readlink(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
Jim_AppendStrings(interp, Jim_GetResult(interp), "couldn't readlink \"", path, "\"", NULL);
return JIM_ERR;
}
+ linkValue[linkLength] = 0;
Jim_SetResult(interp, Jim_NewStringObjNoAlloc(interp, linkValue, linkLength));
return JIM_OK;
}