summaryrefslogtreecommitdiffstats
path: root/src/logicalfile/LMI_FileIdentityProvider.c
diff options
context:
space:
mode:
authorJan Synacek <jsynacek@redhat.com>2013-08-27 10:35:43 +0200
committerJan Synacek <jsynacek@redhat.com>2013-08-27 10:36:12 +0200
commit678c38d2729cd86297c2aedfae1538d1991cb94b (patch)
treead3b425ffa21c2fd25ba174c541802ae5aeecbda /src/logicalfile/LMI_FileIdentityProvider.c
parent887757fa17cbda7a7bcef394bb5692b6b272c7c1 (diff)
downloadopenlmi-providers-678c38d2729cd86297c2aedfae1538d1991cb94b.tar.gz
openlmi-providers-678c38d2729cd86297c2aedfae1538d1991cb94b.tar.xz
openlmi-providers-678c38d2729cd86297c2aedfae1538d1991cb94b.zip
logicalfile: make uses of strcmp() more readable
Diffstat (limited to 'src/logicalfile/LMI_FileIdentityProvider.c')
-rw-r--r--src/logicalfile/LMI_FileIdentityProvider.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/logicalfile/LMI_FileIdentityProvider.c b/src/logicalfile/LMI_FileIdentityProvider.c
index 27507ad..7ada787 100644
--- a/src/logicalfile/LMI_FileIdentityProvider.c
+++ b/src/logicalfile/LMI_FileIdentityProvider.c
@@ -85,10 +85,10 @@ static CMPIStatus associators(
const char *ccname = get_string_property_from_op(cop, "LFCreationClassName");
check_assoc_class(_cb, ns, resultClass, ccname);
- if (role && strcmp(role, SAME_ELEMENT)) {
+ if (role && strcmp(role, SAME_ELEMENT) != 0) {
CMReturn(CMPI_RC_OK);
}
- if (resultRole && strcmp(resultRole, SYSTEM_ELEMENT)) {
+ if (resultRole && strcmp(resultRole, SYSTEM_ELEMENT) != 0) {
CMReturn(CMPI_RC_OK);
}
@@ -98,7 +98,7 @@ static CMPIStatus associators(
}
/* TODO is this error necessary? */
- if (strcmp(fileclass, ccname)) {
+ if (strcmp(fileclass, ccname) != 0) {
CMReturnWithChars(_cb, CMPI_RC_ERR_NOT_FOUND,
"LMCreationClassName is not correct");
}
@@ -118,10 +118,10 @@ static CMPIStatus associators(
const char *path = get_string_property_from_op(cop, "Name");
check_assoc_class(_cb, ns, resultClass, LMI_UnixFile_ClassName);
- if (role && strcmp(role, SYSTEM_ELEMENT)) {
+ if (role && strcmp(role, SYSTEM_ELEMENT) != 0) {
CMReturn(CMPI_RC_OK);
}
- if (resultRole && strcmp(resultRole, SAME_ELEMENT)) {
+ if (resultRole && strcmp(resultRole, SAME_ELEMENT) != 0) {
CMReturn(CMPI_RC_OK);
}
@@ -194,7 +194,7 @@ static CMPIStatus references(
const char *path = get_string_property_from_op(cop, "LFName");
const char *ccname = get_string_property_from_op(cop, "LFCreationClassName");
- if (role && strcmp(role, SAME_ELEMENT)) {
+ if (role && strcmp(role, SAME_ELEMENT) != 0) {
CMReturn(CMPI_RC_OK);
}
@@ -204,7 +204,7 @@ static CMPIStatus references(
}
/* TODO is this error necessary? */
- if (strcmp(fileclass, ccname)) {
+ if (strcmp(fileclass, ccname) != 0) {
CMReturnWithChars(_cb, CMPI_RC_ERR_NOT_FOUND,
"LFCreationClassName is not correct");
}
@@ -228,7 +228,7 @@ static CMPIStatus references(
const char *path = get_string_property_from_op(cop, "Name");
const char *ccname = get_string_property_from_op(cop, "CreationClassName");
- if (role && strcmp(role, SYSTEM_ELEMENT)) {
+ if (role && strcmp(role, SYSTEM_ELEMENT) != 0) {
CMReturn(CMPI_RC_OK);
}
if (get_fsname_from_path(path, &fsname) < 0) {