summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-07-17 18:05:10 -0700
committerJeremy Allison <jra@samba.org>2009-07-17 18:05:10 -0700
commiteba2eb45e208e6b3091c01ff1d40fd966e72a044 (patch)
tree8cce63056f82172ed550429a1c9526648593449d
parent55b4231c773ef17b8e628f33d6c3c9d5335df9da (diff)
downloadsamba-eba2eb45e208e6b3091c01ff1d40fd966e72a044.tar.gz
samba-eba2eb45e208e6b3091c01ff1d40fd966e72a044.tar.bz2
samba-eba2eb45e208e6b3091c01ff1d40fd966e72a044.zip
Fix a typo reading uninitialized memory. Caught by valgrind.
Jeremy.
-rw-r--r--source3/lib/system.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/source3/lib/system.c b/source3/lib/system.c
index ffc236e93b..6a4f5d5413 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -458,8 +458,6 @@ static struct timespec calc_create_time_stat_ex(const struct stat_ex *st)
static void get_create_timespec(const struct stat *pst, struct stat_ex *dst)
{
- struct timespec ret;
-
if (S_ISDIR(pst->st_mode) && lp_fake_dir_create_times()) {
dst->st_ex_btime.tv_sec = 315493200L; /* 1/1/1980 */
dst->st_ex_btime.tv_nsec = 0;
@@ -483,7 +481,7 @@ static void get_create_timespec(const struct stat *pst, struct stat_ex *dst)
/* Deal with systems that don't initialize birthtime correctly.
* Pointed out by SATOH Fumiyasu <fumiyas@osstech.jp>.
*/
- if (null_timespec(ret)) {
+ if (null_timespec(dst->st_ex_btime)) {
dst->st_ex_btime = calc_create_time_stat(pst);
dst->st_ex_calculated_birthtime = true;
}