r17853: Fix an uninitialized variable (m_time2). Jeremy, please check.
authorVolker Lendecke <vlendec@samba.org>
Sun, 27 Aug 2006 16:50:10 +0000 (16:50 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:38:54 +0000 (11:38 -0500)
Thanks,

Volker
(This used to be commit 389910b2d376bc5795b0afacb86e45d7a6987491)

source3/torture/torture.c

index 59d6fa01135f4ffb90b1437e8585159ed420e2d6..2ee0ca5ed74f1132f1f5aa78d04850d35220ea11 100644 (file)
@@ -2467,7 +2467,7 @@ static BOOL run_trans2test(int dummy)
        struct cli_state *cli;
        int fnum;
        SMB_OFF_T size;
-       time_t c_time, a_time, m_time, m_time2;
+       time_t c_time, a_time, m_time;
        struct timespec c_time_ts, a_time_ts, m_time_ts, w_time_ts, m_time2_ts;
        const char *fname = "\\trans2.tst";
        const char *dname = "\\trans2";
@@ -2577,7 +2577,8 @@ static BOOL run_trans2test(int dummy)
                printf("ERROR: qpathinfo2 failed (%s)\n", cli_errstr(cli));
                correct = False;
        } else {
-               if (m_time2 == m_time) {
+               if (memcmp(&m_time_ts, &m_time2_ts, sizeof(struct timespec))
+                   == 0) {
                        printf("This system does not update directory modification times\n");
                        correct = False;
                }