[haiku-commits] haiku: hrev52071 - src/libs/compat/freebsd11_network

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 5 Jul 2018 15:47:02 -0400 (EDT)

hrev52071 adds 1 changeset to branch 'master'
old head: c7eabc40dc551843ccd57b643ca0170cfa1cdf8a
new head: a00c8c44916b03c90884d495db99d3b11fddef1d
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=a00c8c44916b+%5Ec7eabc40dc55

----------------------------------------------------------------------------

a00c8c44916b: freebsd11_network: Add another missing NULL check to 
taskqueue_free.
  
  Also add missing \ns to the new printfs.

                              [ Augustin Cavalier <waddlesplash@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev52071
Commit:      a00c8c44916b03c90884d495db99d3b11fddef1d
URL:         https://git.haiku-os.org/haiku/commit/?id=a00c8c44916b
Author:      Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date:        Thu Jul  5 19:46:02 2018 UTC

----------------------------------------------------------------------------

2 files changed, 7 insertions(+), 2 deletions(-)
src/libs/compat/freebsd11_network/callout.cpp | 2 +-
src/libs/compat/freebsd11_network/taskqueue.c | 7 ++++++-

----------------------------------------------------------------------------

diff --git a/src/libs/compat/freebsd11_network/callout.cpp 
b/src/libs/compat/freebsd11_network/callout.cpp
index 3548ec8494..00f68d3180 100644
--- a/src/libs/compat/freebsd11_network/callout.cpp
+++ b/src/libs/compat/freebsd11_network/callout.cpp
@@ -213,7 +213,7 @@ _callout_stop_safe(struct callout *c, int safe)
        MutexLocker locker(sLock);
 
        if (c == NULL) {
-               printf("_callout_stop_safe called with NULL callout");
+               printf("_callout_stop_safe called with NULL callout\n");
                return 0;
        }
 
diff --git a/src/libs/compat/freebsd11_network/taskqueue.c 
b/src/libs/compat/freebsd11_network/taskqueue.c
index 89c7cbefac..67a45d3281 100644
--- a/src/libs/compat/freebsd11_network/taskqueue.c
+++ b/src/libs/compat/freebsd11_network/taskqueue.c
@@ -220,6 +220,11 @@ taskqueue_start_threads(struct taskqueue **taskQueue, int 
count, int priority,
 void
 taskqueue_free(struct taskqueue *taskQueue)
 {
+       if (taskQueue == NULL) {
+               printf("taskqueue_free called with NULL taskqueue\n");
+               return;
+       }
+
        /* lock and  drain list? */
        taskQueue->tq_flags &= ~TQ_FLAGS_ACTIVE;
        if (!taskQueue->tq_fast)
@@ -248,7 +253,7 @@ taskqueue_drain(struct taskqueue *taskQueue, struct task 
*task)
        cpu_status status;
 
        if (taskQueue == NULL) {
-               printf("taskqueue_drain called with NULL taskqueue");
+               printf("taskqueue_drain called with NULL taskqueue\n");
                return;
        }
 


Other related posts: