tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Several patchs from Debian packaging


From: Thomas Preud'homme
Subject: Re: [Tinycc-devel] Several patchs from Debian packaging
Date: Sun, 18 Apr 2010 22:45:37 +0200
User-agent: KMail/1.12.4 (Linux/2.6.32-3-686; KDE/4.3.4; i686; ; )

Le dimanche 18 avril 2010 22:38:20, Rob a écrit :
> >        if (libprefix && (!strncmp(ext, ".so", 2))) {
> >            size_t len = ext - filename - 3;
> >            strncpy(libname, filename + 3, len);
> >            *(libname + len) = '\0';
> >            return 1;
> >        }
> >
> > I also wonder wether is strncmp is a good idea here as it could match
> > .sowtf for example. I think strcmp is more appropriate here, don't you
> > think ?
> 
> Couldn't help but notice, if you do use strncmp, shouldn't it be
> 
> >strncmp(ext, ".so", 3)
> 
> instead of 2?
> or
> 
> >strncmp(ext, "so", 2)
> 
Yep of course. I did notice that just after my email but I didn't send another 
email as I replaced strncmp by strcmp.

Regards.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]