[Devel] in
openser-1.2.0-tls/modules/dbtext/dbtext_lib.c:dbt_cache_del_db(),
misssing '!' before strncasecmp()!
Henning Westerholt
henning.westerholt at 1und1.de
Fri Mar 30 11:43:23 CEST 2007
On Friday 30 March 2007 10:43, yanlin wrote:
> Hi,
>
> I've just read openser-1.2.0-tls/modules/dbtext/dbtext_lib.c
> In function dbt_cache_del_db(), there are code like:
> " while(_dcache)
> {
> if(_dcache->dbp)
> {
> if(_dcache->dbp->name.len == _s->len
> HERE =========> && strncasecmp(_dcache->dbp->name.s, _s->s, _s->len))
> break;
> }
> // else - delete this cell
> _dcache = _dcache->next;
> }
> "
>
> I think there must be a "!" before strncasecmp().
Hello yanlin,
i'm unfortunally not familar with the dbtext module. But after a quick glance
over the code i think the current state is right. The comment is perhaps a
little bit missleading.
The while loops over the cache, with the next statement. At the right list
element the break leaves the loop, and afterwards the pointers are changed to
delete the element.
BTW, nobody seems to use this code (at least this is what grep tells me). Is
this some kind of extension for future?
Cheers,
Henning
More information about the Devel
mailing list