]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - test/errtest.c
ERR: Remove ERR_put_func_error() and reimplement ERR_put_error() as a macro
[thirdparty/openssl.git] / test / errtest.c
index 88ff8600926fe4a697b0ae214e6b10216c0e4f79..1a18335b6e4245bd70fe58fa819e042e1ade4b1d 100644 (file)
@@ -47,12 +47,14 @@ static int vdata_appends(void)
 /* Test that setting a platform error sets the right values. */
 static int platform_error(void)
 {
-    const char *file = __FILE__, *f, *data;
-    const int line = __LINE__;
+    const char *file, *f, *data;
+    int line;
     int l;
     unsigned long e;
 
-    ERR_put_func_error(ERR_LIB_SYS, "exit", ERR_R_INTERNAL_ERROR, file, line);
+    file = __FILE__;
+    line = __LINE__ + 1; /* The error is generated on the next line */
+    FUNCerr("exit", ERR_R_INTERNAL_ERROR);
     if (!TEST_ulong_ne(e = ERR_get_error_line_data(&f, &l, &data, NULL), 0)
             || !TEST_int_eq(ERR_GET_REASON(e), ERR_R_INTERNAL_ERROR)
             || !TEST_int_eq(l, line)