diff options
author | Guillem Jover <guillem@debian.org> | 2012-03-31 21:55:05 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2012-04-01 10:16:24 +0200 |
commit | 6431c053b78533afafb1193e1dc66391580e6eaf (patch) | |
tree | 93b145949cfaf6ea1ab14e1df291c37a0962b9f3 /dpkg-deb/extract.c | |
parent | 8ae0d0184d3f15ee1edc564d074f682a50f51730 (diff) | |
download | dpkg-6431c053b78533afafb1193e1dc66391580e6eaf.tar.gz |
Use cmp() == 0 instead of !cmp()
Diffstat (limited to 'dpkg-deb/extract.c')
-rw-r--r-- | dpkg-deb/extract.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dpkg-deb/extract.c b/dpkg-deb/extract.c index 361ba1ebe..d0b04a10a 100644 --- a/dpkg-deb/extract.c +++ b/dpkg-deb/extract.c @@ -130,7 +130,7 @@ extracthalf(const char *debar, const char *dir, const char *taroption, if (r < 0) read_fail(r, debar, _("archive magic version number")); - if (!strcmp(versionbuf, DPKG_AR_MAGIC)) { + if (strcmp(versionbuf, DPKG_AR_MAGIC) == 0) { oldformat = false; ctrllennum= 0; @@ -216,7 +216,7 @@ extracthalf(const char *debar, const char *dir, const char *taroption, versionbuf, (intmax_t)stab.st_size, (intmax_t)ctrllennum); m_output(stdout, _("<standard output>")); } - } else if (!strncmp(versionbuf,"0.93",4) && + } else if (strncmp(versionbuf, "0.93", 4) == 0 && sscanf(versionbuf,"%f%c%d",&versionnum,&nlc,&dummy) == 2 && nlc == '\n') { char ctrllenbuf[40]; @@ -250,7 +250,7 @@ extracthalf(const char *debar, const char *dir, const char *taroption, m_output(stdout, _("<standard output>")); } } else { - if (!strncmp(versionbuf,"!<arch>",7)) { + if (strncmp(versionbuf, "!<arch>", 7) == 0) { fprintf(stderr, _("dpkg-deb: file looks like it might be an archive which has been\n" "dpkg-deb: corrupted by being downloaded in ASCII mode\n")); |