Commit f384c40b authored by Daniel Salzman's avatar Daniel Salzman

libknot/tsig: remove redundant newline stripping if key from file

parent cb8f9afd
......@@ -151,14 +151,6 @@ int knot_tsig_key_init_file(knot_tsig_key_t *key, const char *filename)
return KNOT_EMALF;
}
// strip trailing newline
assert(line);
if (read > 0 && line[read - 1] == '\n') {
line[read - 1] = '\0';
read -= 1;
}
int result = knot_tsig_key_init_str(key, line);
memset(line, 0, line_size);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment