if (line == NULL)
return NOTOK;
- if (strncmp(line, "+OK", 3) != 0) {
+ if (!HasPrefix(line, "+OK")) {
netsec_err(errstr, "Authentication failed: %s", line);
return NOTOK;
}
if (pop_getline (buffer, sizeof buffer, nsc) != OK)
return NOTOK;
- if (strncmp (buffer, TRM, TRMLEN) == 0) {
+ if (HasPrefix(buffer, TRM)) {
if (buffer[TRMLEN] == 0)
return DONE;
strncpy (response, buffer + TRMLEN, sizeof(response));