diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-11-28 21:00:20 -0500 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-12-07 12:49:34 -0800 |
| commit | f1e078bd840ffbe45cb827513ca452157e4b7b24 (patch) | |
| tree | 9b74ecbca351cbf6e203542e26552ea07560e073 | |
| parent | 2c98a72d5135a09bcb860eed06b3029d27b7c797 (diff) | |
| download | nng-f1e078bd840ffbe45cb827513ca452157e4b7b24.tar.gz nng-f1e078bd840ffbe45cb827513ca452157e4b7b24.tar.bz2 nng-f1e078bd840ffbe45cb827513ca452157e4b7b24.zip | |
Pipe protocol data is never null.
| -rw-r--r-- | src/core/pipe.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/core/pipe.c b/src/core/pipe.c index c54cdfe0..05089fee 100644 --- a/src/core/pipe.c +++ b/src/core/pipe.c @@ -37,9 +37,7 @@ pipe_destroy(void *arg) { nni_pipe *p = arg; - if (p->p_proto_data != NULL) { - p->p_proto_ops.pipe_fini(p->p_proto_data); - } + p->p_proto_ops.pipe_fini(p->p_proto_data); if (p->p_tran_data != NULL) { p->p_tran_ops.p_fini(p->p_tran_data); } @@ -66,9 +64,7 @@ pipe_reap(void *arg) #endif nni_pipe_remove(p); - if (p->p_proto_data != NULL) { - p->p_proto_ops.pipe_stop(p->p_proto_data); - } + p->p_proto_ops.pipe_stop(p->p_proto_data); if ((p->p_tran_data != NULL) && (p->p_tran_ops.p_stop != NULL)) { p->p_tran_ops.p_stop(p->p_tran_data); } @@ -129,9 +125,7 @@ nni_pipe_close(nni_pipe *p) return; // We already did a close. } - if (p->p_proto_data != NULL) { - p->p_proto_ops.pipe_close(p->p_proto_data); - } + p->p_proto_ops.pipe_close(p->p_proto_data); // Close the underlying transport. if (p->p_tran_data != NULL) { |
