<<< Date Index >>>     <<< Thread Index >>>

Re: [PATCH 03 of 16] Since contex_sb might be uninitialized, it is



Hi,

* Erik Hovland wrote:

@@ -285,12 +288,6 @@
#ifdef USE_POP
 if (!Context || Context->magic != M_POP)
#endif
-  /* check device ID and serial number instead of comparing paths */
-  if (!Context || !Context->path || stat (Context->path, &contex_sb) !=
0)
-  {
-    contex_sb.st_dev=0;
-    contex_sb.st_ino=0;
-  }

I don't disagree w/ you. But the result of the if statement is useless if
the value is initialized before hand.

The problem is that you remove the stat() call which is the only place
contex_sb is filled with values. To initialize it I think we want
something like this:

        contex_sb.st_dev = 0;
        contex_sb.st_ino = 0;

        [...]

        if (Context && Context->path)
          stat (Context->path, &contex_sb);

Rocco