Avoid need to change function code.
[openssl.git] / crypto / ecdsa / ecs_err.c
index 7e85434c75c0d115ff6e0b6f52c71eef7d26e419..d549ee5323782c339a3e863221b35fcb06edda5e 100644 (file)
@@ -1,6 +1,6 @@
 /* crypto/ecdsa/ecs_err.c */
 /* ====================================================================
- * Copyright (c) 1999-2005 The OpenSSL Project.  All rights reserved.
+ * Copyright (c) 1999-2013 The OpenSSL Project.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -93,15 +93,12 @@ static ERR_STRING_DATA ECDSA_str_reasons[]=
 
 void ERR_load_ECDSA_strings(void)
        {
-       static int init=1;
+#ifndef OPENSSL_NO_ERR
 
-       if (init)
+       if (ERR_func_error_string(ECDSA_str_functs[0].error) == NULL)
                {
-               init=0;
-#ifndef OPENSSL_NO_ERR
                ERR_load_strings(0,ECDSA_str_functs);
                ERR_load_strings(0,ECDSA_str_reasons);
-#endif
-
                }
+#endif
        }