Commit graph

12 commits

Author SHA1 Message Date
anthraxx
4a28a8debd some manual (unnecessery) free for good manner
its not needed because OS is responsible to cleanup
mem allocated by terminating process, but its still
a good manner to explicitly free everything that gets
allocated...
yes this is "noise" if it terminates but neither does
harm to feel being responsible to clean up everything
ourselves. :)

at least valgrind is silently happy :P :D
2014-06-10 23:14:29 +02:00
anthraxx
76942f6933 C90 compilant commenting style 2014-06-10 22:56:01 +02:00
Oliver Feldt
297863493f nitpicking and better c standard compliant code 2014-06-10 22:22:10 +02:00
anthraxx
586fa66c35 using printf to avoid \n for pwd input message 2014-06-10 15:42:14 +02:00
anthraxx
6a3da8153d rename my_string to input_str for better naming 2014-06-10 13:03:34 +02:00
anthraxx
ea0b0d95e6 reduce complexity + just free() in a single place
- therefor if the program gets extended, its unlikly that
  someone will forget to call free()
- also this gets rid of copy-paste free() calls (which look stupid)
2014-06-10 13:01:34 +02:00
anthraxx
bf5f98649d explicitly import string.h for strcmp()
- implicitly declaring library function is bad manner :)
2014-06-10 12:47:40 +02:00
anthraxx
320c09285c fixing memleak of input char*
- adding missing free() calls
- dont malloc ourselves as getline() also does a malloc
  (and anyway called realloc before if the size_t was
   smaller then the actual len(input-line) to behaviour
   is the same!)
2014-06-10 12:45:25 +02:00
295b44aff4 remove trailing spaces 2014-06-07 18:40:16 +02:00
ff17c7f33e add trailing spaces 2014-06-07 18:39:45 +02:00
03f9a6ff60 removed debug outputs 2014-06-07 18:36:07 +02:00
efc93bdc6a Added little c-Script to ask for a Password 2014-06-07 18:21:13 +02:00