Consistently write null pointer constants as NULL instead of 0.
[sliver-openvswitch.git] / lib / stream-ssl.c
index 4874bbe..02ce7f5 100644 (file)
@@ -919,7 +919,7 @@ pssl_accept(struct pstream *pstream, struct stream **new_streamp)
     int new_fd;
     int error;
 
-    new_fd = accept(pssl->fd, &sin, &sin_len);
+    new_fd = accept(pssl->fd, (struct sockaddr *) &sin, &sin_len);
     if (new_fd < 0) {
         error = errno;
         if (error != EAGAIN) {
@@ -1044,8 +1044,7 @@ tmp_dh_callback(SSL *ssl OVS_UNUSED, int is_export OVS_UNUSED, int keylength)
             if (!dh->dh) {
                 dh->dh = dh->constructor();
                 if (!dh->dh) {
-                    ovs_fatal(ENOMEM, "out of memory constructing "
-                              "Diffie-Hellman parameters");
+                    out_of_memory();
                 }
             }
             return dh->dh;