From 6a3da8153d6cbe030077af38eb120952e05e83f4 Mon Sep 17 00:00:00 2001 From: anthraxx Date: Tue, 10 Jun 2014 13:03:34 +0200 Subject: [PATCH] rename my_string to input_str for better naming --- challenge/challenge.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/challenge/challenge.c b/challenge/challenge.c index 604f1a5..c100906 100644 --- a/challenge/challenge.c +++ b/challenge/challenge.c @@ -5,15 +5,15 @@ int main() { int ret; size_t nbytes = 0; - char *my_string = NULL; + char *input_str = NULL; char *password = "23door42\n"; puts("Please enter Password: "); - ret = getline(&my_string, &nbytes, stdin); + ret = getline(&input_str, &nbytes, stdin); if (ret == -1) { puts("Error"); - } else if (strcmp(my_string, password) == 0) { + } else if (strcmp(input_str, password) == 0) { puts("Success"); ret = 0; } else { @@ -21,6 +21,6 @@ int main() { ret = -1; } - free(my_string); + free(input_str); return ret; }