summaryrefslogtreecommitdiff
path: root/dpkg-deb
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2012-09-12 07:43:16 +0200
committerGuillem Jover <guillem@debian.org>2013-04-14 05:50:17 +0200
commitd33cf5c4aaf22345a320f292d2a3205e25986aaf (patch)
treea141ed6d19d33dca086cf0118df1ce624a90f425 /dpkg-deb
parent08d1abf93b29b9edbedf7353b2c67761b04b3a2b (diff)
downloaddpkg-d33cf5c4aaf22345a320f292d2a3205e25986aaf.tar.gz
Avoid assignments in C conditionals
Diffstat (limited to 'dpkg-deb')
-rw-r--r--dpkg-deb/extract.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/dpkg-deb/extract.c b/dpkg-deb/extract.c
index 7655158af..c90863a3c 100644
--- a/dpkg-deb/extract.c
+++ b/dpkg-deb/extract.c
@@ -366,7 +366,8 @@ controlextractvextract(int admin, enum dpkg_tar_options taroptions,
{
const char *debar, *dir;
- if (!(debar= *argv++))
+ debar = *argv++;
+ if (debar == NULL)
badusage(_("--%s needs a .deb filename argument"),cipaction->olong);
dir = *argv++;
if (!dir) {
@@ -387,7 +388,8 @@ do_fsystarfile(const char *const *argv)
{
const char *debar;
- if (!(debar= *argv++))
+ debar = *argv++;
+ if (debar == NULL)
badusage(_("--%s needs a .deb filename argument"),cipaction->olong);
if (*argv)
badusage(_("--%s takes only one argument (.deb filename)"),cipaction->olong);