summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixFCmd.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2005-09-15 16:40:02 (GMT)
committerdgp <dgp@users.sourceforge.net>2005-09-15 16:40:02 (GMT)
commitdad41b847302dce4ebd5139c0568aad2ad7a0776 (patch)
tree238980bfb093b32ba311f36a2774bde6bba0c4ee /unix/tclUnixFCmd.c
parent75aee26af34aeea93c32910c88c0d5cef7077ff7 (diff)
downloadtcl-dad41b847302dce4ebd5139c0568aad2ad7a0776.zip
tcl-dad41b847302dce4ebd5139c0568aad2ad7a0776.tar.gz
tcl-dad41b847302dce4ebd5139c0568aad2ad7a0776.tar.bz2
* generic/tclBasic.c: More callers of TclObjPrintf and
* generic/tclCkalloc.c: TclFormatToErrorInfo. * generic/tclCmdMZ.c: * generic/tclExecute.c: * generic/tclIORChan.c: * generic/tclMain.c: * generic/tclProc.c: * generic/tclTimer.c: * generic/tclUtil.c: * unix/tclUnixFCmd.c * unix/configure: autoconf-2.59
Diffstat (limited to 'unix/tclUnixFCmd.c')
-rw-r--r--unix/tclUnixFCmd.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c
index 2e74592..4105544 100644
--- a/unix/tclUnixFCmd.c
+++ b/unix/tclUnixFCmd.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixFCmd.c,v 1.44 2005/07/20 23:16:00 dkf Exp $
+ * RCS: @(#) $Id: tclUnixFCmd.c,v 1.45 2005/09/15 16:40:03 dgp Exp $
*
* Portions of this code were derived from NetBSD source code which has the
* following copyright notice:
@@ -1286,7 +1286,6 @@ GetPermissionsAttribute(interp, objIndex, fileName, attributePtrPtr)
Tcl_Obj **attributePtrPtr; /* A pointer to return the object with. */
{
Tcl_StatBuf statBuf;
- char returnString[7];
int result;
result = TclpObjStat(fileName, &statBuf);
@@ -1300,9 +1299,9 @@ GetPermissionsAttribute(interp, objIndex, fileName, attributePtrPtr)
return TCL_ERROR;
}
- sprintf(returnString, "%0#5lo", (long) (statBuf.st_mode & 0x00007FFF));
-
- *attributePtrPtr = Tcl_NewStringObj(returnString, -1);
+ *attributePtrPtr = Tcl_NewObj();
+ TclObjPrintf(NULL, *attributePtrPtr, "%0#5lo",
+ (long) (statBuf.st_mode & 0x00007FFF));
return TCL_OK;
}