]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
DOC: Fix example in OSSL_PARAM_int.pod
authorRichard Levitte <levitte@openssl.org>
Tue, 17 Nov 2020 08:55:49 +0000 (09:55 +0100)
committerRichard Levitte <levitte@openssl.org>
Wed, 18 Nov 2020 16:12:20 +0000 (17:12 +0100)
This fixes an incorrect NULL check.

Fixes #11162

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13426)

doc/man3/OSSL_PARAM_int.pod

index 691bc3b340e13eeda503b560d2efc58982b14e2f..3d124d74429c7b3faf277a332a031134b59c8c7b 100644 (file)
@@ -362,11 +362,11 @@ could fill in the parameters like this:
 
     OSSL_PARAM *p;
 
-    if ((p = OSSL_PARAM_locate(params, "foo")) == NULL)
+    if ((p = OSSL_PARAM_locate(params, "foo")) != NULL)
         OSSL_PARAM_set_utf8_ptr(p, "foo value");
-    if ((p = OSSL_PARAM_locate(params, "bar")) == NULL)
+    if ((p = OSSL_PARAM_locate(params, "bar")) != NULL)
         OSSL_PARAM_set_utf8_ptr(p, "bar value");
-    if ((p = OSSL_PARAM_locate(params, "cookie")) == NULL)
+    if ((p = OSSL_PARAM_locate(params, "cookie")) != NULL)
         OSSL_PARAM_set_utf8_ptr(p, "cookie value");
 
 =head1 SEE ALSO