Skip to content

nitpicking and better c standard compliant code

Oliver 'jen' Feldt requested to merge (removed):develop into master

let us...

...use the proper main(void) signature.

...use variable names which speak for their semantic content not their type, as types are explicitly declared.

...use perror() to signal the correct errno message upon error.

...move the password out of the running code, so we can change and find it easily.

...use exit() as it's a linear CLI tool, which can and should exit on certain failure/error states.

...decouple error handling from business logic. (e.g. getline() error handling and strcmp() for password check).

...not free() at the end of the program as it is and should never be necessary, since the OS must handle this.

Merge request reports