-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello list,
while trying to solve my problem, I sufred through the source code and found
the named function, which I will paste for reference:
- -----
active_db_h *initng_active_db_find_by_name(const char *service)
{
assert(service);
active_db_h *current = NULL;
D_("(%s);\n", (char *) service);
/* first give the exact find a shot */
if ((current = initng_active_db_find_by_exact_name(service)))
return (current);
/* did not find any */
return NULL;
/* no need in pattern matching, because of unique names in cache (TheLich)
*/
/* walk the active db and compere */
current = NULL;
while_active_db(current)
{
assert(current->name);
/* then try to find alike name */
if (service_match(current->name, service))
return (current);
}
}
- -----
What is not clear to me is TheLich's comment and the code that follows
thereafter. Doesn't the "return NULL;" above make it redundant? Why was the
while loop left there?
Regards,
EMSPV
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
iD8DBQFEwhYZMpEdE19y46cRAuJXAKC5Cl2WeAR8cN/R1nB3BoDIpOTvDACdFySP
N01V1qs39hqLx3NcUJXSrTs=
=n05f
-----END PGP SIGNATURE-----
--
_______________________________________________
Initng mailing list
[email protected]
http://jw.dyndns.org/mailman/listinfo/initng