summaryrefslogtreecommitdiffstats
path: root/text-utils/parse.c
diff options
context:
space:
mode:
authorOndrej Oprala2013-09-23 15:39:37 +0200
committerKarel Zak2013-11-08 14:16:04 +0100
commit3917a95d9065052eb58cf867a54143fe5c0ca50c (patch)
tree768a34dc68ea59c574f61ec7a6e6d16f925bf067 /text-utils/parse.c
parenthexdump: use skip_space() in add() (diff)
downloadkernel-qcow2-util-linux-3917a95d9065052eb58cf867a54143fe5c0ca50c.tar.gz
kernel-qcow2-util-linux-3917a95d9065052eb58cf867a54143fe5c0ca50c.tar.xz
kernel-qcow2-util-linux-3917a95d9065052eb58cf867a54143fe5c0ca50c.zip
hexdump: make addfile() variable names more hinting of their purpose
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Diffstat (limited to 'text-utils/parse.c')
-rw-r--r--text-utils/parse.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/text-utils/parse.c b/text-utils/parse.c
index 66200a870..7454fe15d 100644
--- a/text-utils/parse.c
+++ b/text-utils/parse.c
@@ -58,7 +58,7 @@ FU *endfu; /* format at end-of-data */
void addfile(char *name)
{
- char *p, *buf = NULL;
+ char *fmt, *buf = NULL;
FILE *fp;
size_t n;
@@ -66,14 +66,14 @@ void addfile(char *name)
err(EXIT_FAILURE, _("can't read %s"), name);
while (getline(&buf, &n, fp) != -1) {
- p = buf;
+ fmt = buf;
- while (*p && isspace(*p))
- ++p;
- if (!*p || *p == '#')
+ while (*fmt && isspace(*fmt))
+ ++fmt;
+ if (!*fmt || *fmt == '#')
continue;
- add(p);
+ add(fmt);
}
free(buf);