* Karel Zak <[EMAIL PROTECTED]> [2007-07-13 14:41]:
> On Fri, Jul 13, 2007 at 02:21:15PM +0200, Bernhard Walle wrote:
> > * Karel Zak <[EMAIL PROTECTED]> [2007-07-13 14:13]:
> > > > +static int read_clock_mode(void)
> > > > +{
> > > > +       FILE *fp;
> > > > +       char linebuf[MAX_LINE];
> > > > +
> > > > +       fp = fopen(ADJTIME_PATH, "r");
> > > > +       if (!fp)
> > > > +               return 0;
> > > > +
> > >   ....
> > > 
> > >   fclose(fp);
> >
> > That would be fclose(NULL). Where's the benefit?
> 
>  Well, I mean that you don't close the "fd" when you successfully read
>  third line from /etc/adjtime. See end of read_clock_mode(), there is
>  "return 1", but not fclose().

Ah, ok, thanks :)


Thanks,
   Bernhard
-
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to