+2008-05-24 Guillem Jover <guillem@debian.org>
+
+ * dpkg-deb/main.c: Include <dpkg-priv.h>.
+ (setaction): Use sizeof_array instead of ad-hoc calculation.
+ * dpkg-split/main.c: Include <dpkg-priv.h>.
+ (setaction): Use sizeof_array instead of ad-hoc calculation.
+
2008-05-24 Guillem Jover <guillem@debian.org>
* src/trigcmd.c (main): Remove duplicate program name from badusage.
#include <dpkg.h>
#include <dpkg-db.h>
+#include <dpkg-priv.h>
#include <myopt.h>
#include "dpkg-deb.h"
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];
}
#include <dpkg.h>
#include <dpkg-db.h>
+#include <dpkg-priv.h>
#include <myopt.h>
#include "dpkg-split.h"
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];
}