svn commit: samba r16338 - branches/SAMBA_3_0/source/client
trunk/source/client
vlendec at samba.org
vlendec at samba.org
Sun Jun 18 09:26:05 GMT 2006
Author: vlendec
Date: 2006-06-18 09:26:05 +0000 (Sun, 18 Jun 2006)
New Revision: 16338
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16338
Log:
Fix Klocwork ID 150
Modified:
branches/SAMBA_3_0/source/client/client.c
branches/SAMBA_3_0/source/client/smbctool.c
trunk/source/client/client.c
trunk/source/client/smbctool.c
Changeset:
Modified: branches/SAMBA_3_0/source/client/client.c
===================================================================
--- branches/SAMBA_3_0/source/client/client.c 2006-06-18 08:35:27 UTC (rev 16337)
+++ branches/SAMBA_3_0/source/client/client.c 2006-06-18 09:26:05 UTC (rev 16338)
@@ -447,9 +447,16 @@
* 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';
} else if (do_list_queue_start > (do_list_queue_size / 2)) {
DEBUG(4,("sliding do_list_queue backward\n"));
Modified: branches/SAMBA_3_0/source/client/smbctool.c
===================================================================
--- branches/SAMBA_3_0/source/client/smbctool.c 2006-06-18 08:35:27 UTC (rev 16337)
+++ branches/SAMBA_3_0/source/client/smbctool.c 2006-06-18 09:26:05 UTC (rev 16338)
@@ -528,9 +528,16 @@
* 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';
} else if (do_list_queue_start > (do_list_queue_size / 2)) {
DEBUG(4,("sliding do_list_queue backward\n"));
Modified: trunk/source/client/client.c
===================================================================
--- trunk/source/client/client.c 2006-06-18 08:35:27 UTC (rev 16337)
+++ trunk/source/client/client.c 2006-06-18 09:26:05 UTC (rev 16338)
@@ -447,9 +447,16 @@
* 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';
} else if (do_list_queue_start > (do_list_queue_size / 2)) {
DEBUG(4,("sliding do_list_queue backward\n"));
Modified: trunk/source/client/smbctool.c
===================================================================
--- trunk/source/client/smbctool.c 2006-06-18 08:35:27 UTC (rev 16337)
+++ trunk/source/client/smbctool.c 2006-06-18 09:26:05 UTC (rev 16338)
@@ -528,9 +528,16 @@
* 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';
} else if (do_list_queue_start > (do_list_queue_size / 2)) {
DEBUG(4,("sliding do_list_queue backward\n"));
More information about the samba-cvs
mailing list