diff options
| author | Pavel Šimerda <psimerda@redhat.com> | 2013-04-15 13:40:14 +0200 |
|---|---|---|
| committer | Jiří Klimeš <jklimes@redhat.com> | 2013-04-15 13:43:34 +0200 |
| commit | b292af8e1d6329b8155d7573cc9ac496b4004859 (patch) | |
| tree | 26bf53c747c65e460ce6ebe8ed3c100d3835592b | |
| parent | 5cc26c60efc91eef05c64853a662005e46f8c817 (diff) | |
| download | NetworkManager-b292af8e1d6329b8155d7573cc9ac496b4004859.tar.gz | |
trivial: avoid -Wshadow
jklimes: read vs. read(3), use 'num' instead
| -rw-r--r-- | cli/src/utils.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cli/src/utils.c b/cli/src/utils.c index db4d2f1c82..452051ccc1 100644 --- a/cli/src/utils.c +++ b/cli/src/utils.c @@ -253,18 +253,18 @@ nmc_get_user_input (const char *ask_str) { char *line = NULL; size_t line_ln = 0; - ssize_t read; + ssize_t num; fprintf (stdout, "%s", ask_str); - read = getline (&line, &line_ln, stdin); + num = getline (&line, &line_ln, stdin); /* Remove newline from the string */ - if (read < 1 || (read == 1 && line[0] == '\n')) { + if (num < 1 || (num == 1 && line[0] == '\n')) { g_free (line); line = NULL; } else { - if (line[read-1] == '\n') - line[read-1] = '\0'; + if (line[num-1] == '\n') + line[num-1] = '\0'; } return line; |
