diff options
author | Guillem Jover <guillem@debian.org> | 2008-05-24 08:46:24 +0300 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2008-05-24 08:46:24 +0300 |
commit | f82df02606c0ebb07dcd8646fe201f724b3b8479 (patch) | |
tree | 61d69dd8dd19945178bd80da5422973577458a40 /dpkg-split | |
parent | bc31b590e44bde6a7c1433fbfe62e7fffa64e7d0 (diff) | |
download | dpkg-f82df02606c0ebb07dcd8646fe201f724b3b8479.tar.gz |
Use sizeof_array instead of ad-hoc calculation
Diffstat (limited to 'dpkg-split')
-rw-r--r-- | dpkg-split/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/dpkg-split/main.c b/dpkg-split/main.c index 7eff4b429..da8b9a724 100644 --- a/dpkg-split/main.c +++ b/dpkg-split/main.c @@ -30,6 +30,7 @@ #include <dpkg.h> #include <dpkg-db.h> +#include <dpkg-priv.h> #include <myopt.h> #include "dpkg-split.h" @@ -152,7 +153,7 @@ static void setaction(const struct cmdinfo *cip, const char *value) { badusage(_("conflicting actions -%c (--%s) and -%c (--%s)"), cip->oshort, cip->olong, cipaction->oshort, cipaction->olong); cipaction= cip; - assert((int)(cip-cmdinfos) < (int)(sizeof(dofunctions)*sizeof(dofunction*))); + assert((int)(cip - cmdinfos) < (int)(sizeof_array(dofunctions))); action= dofunctions[cip-cmdinfos]; } |