Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/usr.sbin/sup/source
Christos> Module Name: src Committed By: christos Date: Wed Mar 22
Christos> 17:14:16 UTC 2006
Christos> Modified Files:
Christos> src/usr.sbin/sup/source: stree.c
Christos> Log Message: Coverity CID 798: t can only be null if p is
Christos> null. otherwise p needs to contain a name.
Seems like this change broke sup for me. I now get:
SUP 8.26 (4.3 BSD) for file anoncvs.sup at Apr 13 09:44:52
SUP Upgrade of anoncvs-all at Thu Apr 13 09:44:53 2006
SUP Fileserver 8.13 (4.3 BSD) 19785 on sup2.fr.netbsd.org at 09:44:53
SUP Requesting changes since Apr 12 19:16:30 2006
assertion "(t == NULL && p == NULL) || (t != NULL && p != NULL)" failed: file
"/usr/src/usr.sbin/sup/source/stree.c", line 232, function "Tinsert"
If I undo the change above it works again. It looks like the t==NULL
case is not an error. Inserting a non-null element into a null tree
should not trigger the assert, it is normal behaviour, see Tinsertavl().
So "t can only be null if p is null" seems incorrect if Coverity
really said that.
Best regards,
-- Urban
Index: stree.c
===================================================================
RCS file: /anoncvs/src/usr.sbin/sup/source/stree.c,v
retrieving revision 1.9
diff -u -r1.9 stree.c
--- stree.c 2 Apr 2006 01:39:48 -0000 1.9
+++ stree.c 13 Apr 2006 21:27:05 -0000
@@ -229,8 +229,7 @@
{
int deltah;
- assert((t == NULL && p == NULL) || (t != NULL && p != NULL));
- if (p[0] == '.' && p[1] == '/') {
+ if (p != NULL && p[0] == '.' && p[1] == '/') {
p += 2;
while (*p == '/')
p++;
Home |
Main Index |
Thread Index |
Old Index