New upstream version 4.15.2
This commit is contained in:
+5
-3
@@ -14,6 +14,7 @@
|
||||
#include <strings.h>
|
||||
|
||||
#include "alloc.h"
|
||||
#include "atoi/str2i.h"
|
||||
#include "prototypes.h"
|
||||
#include "string/stpeprintf.h"
|
||||
#include "idmapping.h"
|
||||
@@ -24,6 +25,7 @@
|
||||
#include "shadowlog.h"
|
||||
#include "sizeof.h"
|
||||
|
||||
|
||||
struct map_range *get_map_ranges(int ranges, int argc, char **argv)
|
||||
{
|
||||
struct map_range *mappings, *mapping;
|
||||
@@ -49,15 +51,15 @@ struct map_range *get_map_ranges(int ranges, int argc, char **argv)
|
||||
/* Gather up the ranges from the command line */
|
||||
mapping = mappings;
|
||||
for (idx = 0, argidx = 0; idx < ranges; idx++, argidx += 3, mapping++) {
|
||||
if (getulong(argv[argidx + 0], &mapping->upper) == -1) {
|
||||
if (str2ul(&mapping->upper, argv[argidx + 0]) == -1) {
|
||||
free(mappings);
|
||||
return NULL;
|
||||
}
|
||||
if (getulong(argv[argidx + 1], &mapping->lower) == -1) {
|
||||
if (str2ul(&mapping->lower, argv[argidx + 1]) == -1) {
|
||||
free(mappings);
|
||||
return NULL;
|
||||
}
|
||||
if (getulong(argv[argidx + 2], &mapping->count) == -1) {
|
||||
if (str2ul(&mapping->count, argv[argidx + 2]) == -1) {
|
||||
free(mappings);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user