mirror of
https://git.tukaani.org/xz.git
synced 2024-04-04 12:36:23 +02:00
xz: size_t/uint32_t cleanup in options.c.
This commit is contained in:
parent
8bcca29a65
commit
e0ea6737b0
1 changed files with 6 additions and 6 deletions
|
@ -59,7 +59,7 @@ typedef struct {
|
||||||
static void
|
static void
|
||||||
parse_options(const char *str, const option_map *opts,
|
parse_options(const char *str, const option_map *opts,
|
||||||
void (*set)(void *filter_options,
|
void (*set)(void *filter_options,
|
||||||
uint32_t key, uint64_t value, const char *valuestr),
|
unsigned key, uint64_t value, const char *valuestr),
|
||||||
void *filter_options)
|
void *filter_options)
|
||||||
{
|
{
|
||||||
if (str == NULL || str[0] == '\0')
|
if (str == NULL || str[0] == '\0')
|
||||||
|
@ -87,7 +87,7 @@ parse_options(const char *str, const option_map *opts,
|
||||||
"pairs separated with commas"), str);
|
"pairs separated with commas"), str);
|
||||||
|
|
||||||
// Look for the option name from the option map.
|
// Look for the option name from the option map.
|
||||||
size_t i = 0;
|
unsigned i = 0;
|
||||||
while (true) {
|
while (true) {
|
||||||
if (opts[i].name == NULL)
|
if (opts[i].name == NULL)
|
||||||
message_fatal(_("%s: Invalid option name"),
|
message_fatal(_("%s: Invalid option name"),
|
||||||
|
@ -103,7 +103,7 @@ parse_options(const char *str, const option_map *opts,
|
||||||
if (opts[i].map != NULL) {
|
if (opts[i].map != NULL) {
|
||||||
// value is a string which we should map
|
// value is a string which we should map
|
||||||
// to an integer.
|
// to an integer.
|
||||||
size_t j;
|
unsigned j;
|
||||||
for (j = 0; opts[i].map[j].name != NULL; ++j) {
|
for (j = 0; opts[i].map[j].name != NULL; ++j) {
|
||||||
if (strcmp(opts[i].map[j].name, value) == 0)
|
if (strcmp(opts[i].map[j].name, value) == 0)
|
||||||
break;
|
break;
|
||||||
|
@ -149,7 +149,7 @@ enum {
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
set_delta(void *options, uint32_t key, uint64_t value,
|
set_delta(void *options, unsigned key, uint64_t value,
|
||||||
const char *valuestr lzma_attribute((__unused__)))
|
const char *valuestr lzma_attribute((__unused__)))
|
||||||
{
|
{
|
||||||
lzma_options_delta *opt = options;
|
lzma_options_delta *opt = options;
|
||||||
|
@ -193,7 +193,7 @@ enum {
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
set_bcj(void *options, uint32_t key, uint64_t value,
|
set_bcj(void *options, unsigned key, uint64_t value,
|
||||||
const char *valuestr lzma_attribute((__unused__)))
|
const char *valuestr lzma_attribute((__unused__)))
|
||||||
{
|
{
|
||||||
lzma_options_bcj *opt = options;
|
lzma_options_bcj *opt = options;
|
||||||
|
@ -249,7 +249,7 @@ error_lzma_preset(const char *valuestr)
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
set_lzma(void *options, uint32_t key, uint64_t value, const char *valuestr)
|
set_lzma(void *options, unsigned key, uint64_t value, const char *valuestr)
|
||||||
{
|
{
|
||||||
lzma_options_lzma *opt = options;
|
lzma_options_lzma *opt = options;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue