tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: snapshot support for fsck_ffs



On Sun, Aug 24, 2008 at 05:51:06PM +0200, Manuel Bouyer wrote:
 >      while (argc-- > 0) {
 > -            const char *path = blockcheck(*argv);
 > +            int nret;
 > +            char *path = strdup(blockcheck(*argv));
 >  
 >              if (path == NULL)
 >                      pfatal("Can't check %s\n", *argv);

That probably needs another null check; strdup(NULL) isn't defined.

 > +                    nret = checkfilesys(blockcheck(snap_dev), path, 0);

also here.

Although, upon inspection, blockcheck() doesn't actually seem to be
able to return null. So maybe this is silly.

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index