MCPcopy Create free account
hub / github.com/F-Stack/f-stack / _res_checkenv

Function _res_checkenv

freebsd/kern/subr_hints.c:101–117  ·  view source on GitHub ↗

* Checks the environment to see if we even have any hints. If it has no hints, * then res_find can take the hint that there's no point in searching it and * either move on to the next environment or fail early. */

Source from the content-addressed store, hash-verified

99 * either move on to the next environment or fail early.
100 */
101static bool
102_res_checkenv(char *envp)
103{
104 char *cp;
105
106 cp = envp;
107 while (cp) {
108 if (strncmp(cp, "hint.", 5) == 0)
109 return (true);
110 while (*cp != '\0')
111 cp++;
112 cp++;
113 if (*cp == '\0')
114 break;
115 }
116 return (false);
117}
118
119/*
120 * Evil wildcarding resource string lookup.

Callers 1

res_findFunction · 0.85

Calls 1

strncmpFunction · 0.85

Tested by

no test coverage detected