Include error library value in C error source files instead of fixing up
[openssl.git] / crypto / err / err.c
index 1d186a7b9bbdf8beefb4bc9c95fea797524d3da4..549229bcfb39f8709af911524937d1daf556553e 100644 (file)
@@ -631,7 +631,8 @@ static void err_load_strings(int lib, ERR_STRING_DATA *str)
        {
        while (str->error)
                {
-               str->error|=ERR_PACK(lib,0,0);
+               if (lib)
+                       str->error|=ERR_PACK(lib,0,0);
                ERRFN(err_set_item)(str);
                str++;
                }
@@ -647,7 +648,8 @@ void ERR_unload_strings(int lib, ERR_STRING_DATA *str)
        {
        while (str->error)
                {
-               str->error|=ERR_PACK(lib,0,0);
+               if (lib)
+                       str->error|=ERR_PACK(lib,0,0);
                ERRFN(err_del_item)(str);
                str++;
                }