summaryrefslogtreecommitdiffstats
path: root/source/client
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-06-18 09:26:05 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:17:36 -0500
commitded2952e00fec712ce612cf6aaabf85c1a6f4488 (patch)
tree8a555569dd8176f233cf6a2a944496aa16ab5ca3 /source/client
parent1b3a24732df19addb8c2dfaae99f5fbf5bbccc44 (diff)
downloadsamba-ded2952e00fec712ce612cf6aaabf85c1a6f4488.tar.gz
samba-ded2952e00fec712ce612cf6aaabf85c1a6f4488.tar.xz
samba-ded2952e00fec712ce612cf6aaabf85c1a6f4488.zip
r16338: Fix Klocwork ID 150
Diffstat (limited to 'source/client')
-rw-r--r--source/client/client.c9
-rw-r--r--source/client/smbctool.c9
2 files changed, 16 insertions, 2 deletions
diff --git a/source/client/client.c b/source/client/client.c
index d7fe4d43c32..0a695436f57 100644
--- a/source/client/client.c
+++ b/source/client/client.c
@@ -447,7 +447,14 @@ static void adjust_do_list_queue(void)
* If the starting point of the queue is more than half way through,
* move everything toward the beginning.
*/
- if (do_list_queue && (do_list_queue_start == do_list_queue_end)) {
+
+ if (do_list_queue == NULL) {
+ DEBUG(4,("do_list_queue is empty\n"));
+ do_list_queue_start = do_list_queue_end = 0;
+ return;
+ }
+
+ if (do_list_queue_start == do_list_queue_end) {
DEBUG(4,("do_list_queue is empty\n"));
do_list_queue_start = do_list_queue_end = 0;
*do_list_queue = '\0';
diff --git a/source/client/smbctool.c b/source/client/smbctool.c
index b3acca55738..3233ee49554 100644
--- a/source/client/smbctool.c
+++ b/source/client/smbctool.c
@@ -528,7 +528,14 @@ static void adjust_do_list_queue(void)
* If the starting point of the queue is more than half way through,
* move everything toward the beginning.
*/
- if (do_list_queue && (do_list_queue_start == do_list_queue_end)) {
+
+ if (do_list_queue == NULL) {
+ DEBUG(4,("do_list_queue is empty\n"));
+ do_list_queue_start = do_list_queue_end = 0;
+ return;
+ }
+
+ if (do_list_queue_start == do_list_queue_end) {
DEBUG(4,("do_list_queue is empty\n"));
do_list_queue_start = do_list_queue_end = 0;
*do_list_queue = '\0';