Nope, above doesn't work, this should:
static gboolean is_env (const char *a, const char *b) { while (*a == *b) { if (*a == 0 || *b == 0 || *b == '=') /* cover naughty equals usage */ return FALSE;
a++; b++; }
if (*a == '=' && *b == 0) return TRUE;
return FALSE; }
Nope, above doesn't work, this should:
static gboolean
is_env (const char *a,
const char *b)
{
while (*a == *b)
{
if (*a == 0 || *b == 0 || *b == '=') /* cover naughty equals usage */
return FALSE;
a++;
b++;
}
if (*a == '=' && *b == 0)
return TRUE;
return FALSE;
}