2 * Seccomp Library test support program
4 * Copyright (c) 2015 Mathias Krause <minipli@googlemail.com>
8 * This library is free software; you can redistribute it and/or modify it
9 * under the terms of version 2.1 of the GNU Lesser General Public License as
10 * published by the Free Software Foundation.
12 * This library is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this library; if not, see <http://www.gnu.org/licenses>.
27 static int get_number(char *str
, uint64_t *res
)
32 *res
= strtoull(str
, &end
, 0);
33 if (errno
|| *end
!= '\0') {
34 fprintf(stderr
, "error: failed to convert '%s'\n", str
);
41 int main(int argc
, char *argv
[])
43 uint64_t first
, last
, cur
;
46 fprintf(stderr
, "usage: %s FIRST LAST\n", argv
[0]);
50 if (get_number(argv
[1], &first
) || get_number(argv
[2], &last
))
53 for (cur
= first
; cur
<= last
; cur
++)
54 printf("%" PRIu64
"\n", cur
);
This page took 0.021462 seconds and 4 git commands to generate.