ref: refs/heads/master
commit 19435f5f292a17090fe493b5ce75cc1132e984db
Author: Klaus Kämpf
Date: Tue Jun 23 15:51:19 2009 +0200
Catch NULL pointers
---
applayer/job.c | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/applayer/job.c b/applayer/job.c
index 7c6f957..cc7b8af 100644
--- a/applayer/job.c
+++ b/applayer/job.c
@@ -70,12 +70,14 @@ job_relation( const Job *j )
int
job_equal( const Job *job1, const Job *job2 )
{
- if (job1 != job2)
- {
- if (job1->pool != job2->pool
- || job1->cmd != job2->cmd
- || job1->id != job2->id)
- return 0;
- }
- return 1;
+ if (job1
+ && job2
+ && ((job1 == job2)
+ || (job1->pool == job2->pool
+ && job1->cmd == job2->cmd
+ && job1->id == job2->id)
+ )
+ )
+ return 1;
+ return 0;
}
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org