summaryrefslogtreecommitdiffabout
path: root/src/binlogcat.c
authorSergey Poznyakoff <gray@gnu.org.ua>2013-10-15 18:12:32 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2013-10-15 18:12:32 (GMT)
commit340802898d02bad367efc8f8ba1517d42fe4baad (patch) (side-by-side diff)
tree8e3300600ddf02fd9d19d8c11a45b5eb87ba9717 /src/binlogcat.c
parent2afd00cc2bdbaa401edc7117965b3db658576719 (diff)
downloadvmod-binlog-340802898d02bad367efc8f8ba1517d42fe4baad.tar.gz
vmod-binlog-340802898d02bad367efc8f8ba1517d42fe4baad.tar.bz2
Minor change
Use 'format' instead of 'dataspec'
Diffstat (limited to 'src/binlogcat.c') (more/less context) (ignore whitespace changes)
-rw-r--r--src/binlogcat.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/binlogcat.c b/src/binlogcat.c
index 6ab3daf..bc7df6c 100644
--- a/src/binlogcat.c
+++ b/src/binlogcat.c
@@ -43,7 +43,7 @@ catlog(const char *fname)
char timebuf[128];
size_t i;
time_t start_ts;
- char *dataspec;
+ char *format;
size_t size;
struct packenv *env;
struct packinst *inst;
@@ -76,9 +76,9 @@ catlog(const char *fname)
}
size = header.hdrsize - sizeof(header);
- dataspec = xmalloc(size);
+ format = xmalloc(size);
- if (fread(dataspec, size, 1, fp) != 1) {
+ if (fread(format, size, 1, fp) != 1) {
error("error reading header of %s: %s",
fname, strerror(errno));
exit(1);
@@ -86,20 +86,20 @@ catlog(const char *fname)
if (verbose_option)
printf("# %s; format=%s; recsize=%lu; recnum=%lu\n",
- fname, dataspec, (unsigned long) header.recsize,
+ fname, format, (unsigned long) header.recsize,
(unsigned long) header.recnum);
- inst = packcomp(dataspec, &p);
+ inst = packcomp(format, &p);
if (!inst) {
if (errno == EINVAL) {
- error("%s: %s: bad dataspec near %s", fname, dataspec, p);
+ error("%s: %s: bad format near %s", fname, format, p);
exit(1);
}
error("%s", strerror(errno));
exit(1);
}
- free(dataspec);
+ free(format);
rec = xmalloc(header.recsize);
env = packenv_create(header.recsize -

Return to:

Send suggestions and report system problems to the System administrator.