
#include <stdbool.h>

#include "core.h"
#include "crypto_onetimeauth.h"

static bool initialized;

int
sodium_init(void)
{
    if (initialized != 0) {
        return 1;
    }
    initialized = 1;
    if (crypto_onetimeauth_pick_best_implementation() == NULL) {
        return -1;
    }
    return 0;
}


#include <stdbool.h>

#include "core.h"
#include "crypto_onetimeauth.h"

static bool initialized;

int
sodium_init(void)
{
    if (initialized != 0) {
        return 1;
    }
    if (crypto_onetimeauth_pick_best_implementation() == NULL) {
        return -1;
    }
    initialized = 1;

    return 0;
}

Set initialized=1 when everything has actually been initialized
Set initialized=1 when everything has actually been initialized
