localedef(1): make better use of calloc(3) arguments.
authorpfg <pfg@FreeBSD.org>
Wed, 14 Sep 2016 16:47:18 +0000 (16:47 +0000)
committerpfg <pfg@FreeBSD.org>
Wed, 14 Sep 2016 16:47:18 +0000 (16:47 +0000)
commit995a02cf205e86183ef4965ae5f25a984e00992f
tree17bcdfd133d57fda63335b0f2823531f541d6799
parent96b13f0aaac6f19832f6eb069196b6a3cc85aa5b
localedef(1): make better use of calloc(3) arguments.

The first argument of calloc(3) should be an ordinal type, and the
second a size: split a multiplication to make better use of calloc(3)
and detect overflows.

Do some other re-ordering and style fixes while here.

MFC after: 3 weeks
usr.bin/localedef/collate.c