mirror of
https://github.com/ostreedev/ostree.git
synced 2024-12-23 21:35:26 +03:00
ostree-deployment.c: simplify equality check
Just a random cozy patch I made while perusing the codebase. When determining if two OstreeDeployment objects are the same, rather than just checking for NULL, we can just directly check for equality of pointers to also catch the trivial case. Closes: #1082 Approved by: cgwalters
This commit is contained in:
parent
6063bdb013
commit
fa3a31af92
@ -188,7 +188,7 @@ ostree_deployment_equal (gconstpointer ap, gconstpointer bp)
|
||||
OstreeDeployment *a = (OstreeDeployment*)ap;
|
||||
OstreeDeployment *b = (OstreeDeployment*)bp;
|
||||
|
||||
if (a == NULL && b == NULL)
|
||||
if (a == b)
|
||||
return TRUE;
|
||||
else if (a != NULL && b != NULL)
|
||||
return g_str_equal (ostree_deployment_get_osname (a),
|
||||
|
Loading…
Reference in New Issue
Block a user