Read a line from stdin, do not take the newline character into account. */
| 102 | |
| 103 | /* Read a line from stdin, do not take the newline character into account. */ |
| 104 | static bool getline_stdin_pass(char **passwd, size_t *passwd_size) |
| 105 | { |
| 106 | if (getline(passwd, passwd_size, stdin) < 0) |
| 107 | return false; |
| 108 | |
| 109 | if ((*passwd)[strlen(*passwd) - 1] == '\n') |
| 110 | (*passwd)[strlen(*passwd) - 1] = '\0'; |
| 111 | |
| 112 | return true; |
| 113 | } |
| 114 | |
| 115 | char *read_stdin_pass_with_exit_code(char **reason, int *exit_code) |
| 116 | { |
no outgoing calls
no test coverage detected