From dac802bce2e7fa909dac09d87f6fadb6074b9097 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Thu, 7 Jul 2011 19:08:18 +0200 Subject: dpkg-deb: Use CONTROLFILE instead of a literal string --- dpkg-deb/info.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'dpkg-deb') diff --git a/dpkg-deb/info.c b/dpkg-deb/info.c index cd67d7887..c7ab5e62b 100644 --- a/dpkg-deb/info.c +++ b/dpkg-deb/info.c @@ -184,12 +184,12 @@ info_list(const char *debar, const char *dir) free(cdlist); varbuf_trunc(&controlfile, dirlen); - varbuf_add_str(&controlfile, "control"); + varbuf_add_str(&controlfile, CONTROLFILE); varbuf_end_str(&controlfile); cc = fopen(controlfile.buf, "r"); if (!cc) { if (errno != ENOENT) - ohshite(_("failed to read `%.255s' (in `%.255s')"), "control", dir); + ohshite(_("failed to read `%.255s' (in `%.255s')"), CONTROLFILE, dir); fputs(_("(no `control' file in control archive!)\n"), stdout); } else { lines= 1; @@ -203,7 +203,7 @@ info_list(const char *debar, const char *dir) putc('\n', stdout); if (ferror(cc)) - ohshite(_("failed to read `%.255s' (in `%.255s')"), "control", dir); + ohshite(_("failed to read `%.255s' (in `%.255s')"), CONTROLFILE, dir); fclose(cc); } @@ -270,7 +270,7 @@ info_field(const char *debar, const char *dir, const char *const *fields, } if (ferror(cc)) ohshite(_("failed during read of `control' component")); if (fclose(cc)) - ohshite(_("error closing the '%s' component"), "control"); + ohshite(_("error closing the '%s' component"), CONTROLFILE); if (doing) putc('\n',stdout); m_output(stdout, _("")); varbuf_destroy(&controlfile); @@ -326,7 +326,7 @@ do_field(const char *const *argv) if (*argv) { info_field(debar, dir, argv, argv[1] != NULL); } else { - static const char *const controlonly[] = { "control", NULL }; + static const char *const controlonly[] = { CONTROLFILE, NULL }; info_spew(debar, dir, controlonly); } -- cgit v1.2.3