X-Git-Url: http://git.ieval.ro/?p=linux-seccomp.git;a=blobdiff_plain;f=libseccomp%2Ftests%2Fminiseq.c;fp=libseccomp%2Ftests%2Fminiseq.c;h=0000000000000000000000000000000000000000;hp=7addc708620e3830114660e129a0d6120479e2c9;hb=a7f80a138de41255578bc28d034438a295ecbb2e;hpb=a8d04cb21e9ce2cfa37d893162df3e4943d9e480 diff --git a/libseccomp/tests/miniseq.c b/libseccomp/tests/miniseq.c deleted file mode 100644 index 7addc70..0000000 --- a/libseccomp/tests/miniseq.c +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Seccomp Library test support program - * - * Copyright (c) 2015 Mathias Krause - */ - -/* - * This library is free software; you can redistribute it and/or modify it - * under the terms of version 2.1 of the GNU Lesser General Public License as - * published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, see . - */ - -#include -#include -#include -#include -#include - -static int get_number(char *str, uint64_t *res) -{ - char *end = str; - - errno = 0; - *res = strtoull(str, &end, 0); - if (errno || *end != '\0') { - fprintf(stderr, "error: failed to convert '%s'\n", str); - return -1; - } - - return 0; -} - -int main(int argc, char *argv[]) -{ - uint64_t first, last, cur; - - if (argc != 3) { - fprintf(stderr, "usage: %s FIRST LAST\n", argv[0]); - return 1; - } - - if (get_number(argv[1], &first) || get_number(argv[2], &last)) - return 1; - - for (cur = first; cur <= last; cur++) - printf("%" PRIu64 "\n", cur); - - return 0; -}