child-rekey: Suppress updown event when deleting redundant CHILD_SAs
[strongswan.git] / scripts / hash_burn.c
index 20e5642..0aa9bf1 100644 (file)
@@ -25,7 +25,7 @@ int main(int argc, char *argv[])
        char buffer[1024];
        int limit = 0, i = 0;
 
-       library_init(NULL);
+       library_init(NULL, "hash_burn");
        lib->plugins->load(lib->plugins, PLUGINS);
        atexit(library_deinit);
 
@@ -43,8 +43,7 @@ int main(int argc, char *argv[])
                limit = atoi(argv[2]);
        }
 
-       alg = enum_from_name(hash_algorithm_short_names, argv[1]);
-       if (alg == -1)
+       if (!enum_from_name(hash_algorithm_short_names, argv[1], &alg))
        {
                fprintf(stderr, "unknown hash algorthm: %s\n", argv[1]);
                return 1;