summaryrefslogtreecommitdiffstats
path: root/test/enum.c
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2011-03-23 12:35:19 +0100
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2011-03-23 12:35:19 +0100
commitff7f2398283f5059e3b8e0149e0582ee7d30ad21 (patch)
tree598637736b0c8164dabad2c163b01816279f0051 /test/enum.c
parent6c822e1dedff95eeb64733e8ae0f7554b01bcd17 (diff)
downloaduca-ff7f2398283f5059e3b8e0149e0582ee7d30ad21.tar.gz
uca-ff7f2398283f5059e3b8e0149e0582ee7d30ad21.tar.bz2
uca-ff7f2398283f5059e3b8e0149e0582ee7d30ad21.tar.xz
uca-ff7f2398283f5059e3b8e0149e0582ee7d30ad21.zip
Use more flexible error codes
Diffstat (limited to 'test/enum.c')
-rw-r--r--test/enum.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/enum.c b/test/enum.c
index 954b734..f28bf9b 100644
--- a/test/enum.c
+++ b/test/enum.c
@@ -42,21 +42,21 @@ int main(int argc, char *argv[])
printf("%s = ", prop->name);
switch (prop->type) {
case uca_string:
- if (cam->get_property(cam, i, string_value, num_bytes) != UCA_ERR_PROP_INVALID) {
+ if (cam->get_property(cam, i, string_value, num_bytes) == UCA_NO_ERROR) {
printf("%s ", string_value);
}
else
printf("n/a");
break;
case uca_uint32t:
- if (cam->get_property(cam, i, &uint32_value, 0) != UCA_ERR_PROP_INVALID) {
+ if (cam->get_property(cam, i, &uint32_value, 0) == UCA_NO_ERROR) {
printf("%i %s", uint32_value, uca_unit_map[prop->unit]);
}
else
printf("n/a");
break;
case uca_uint8t:
- if (cam->get_property(cam, i, &uint8_value, 0) != UCA_ERR_PROP_INVALID) {
+ if (cam->get_property(cam, i, &uint8_value, 0) == UCA_NO_ERROR) {
printf("%i %s", uint8_value, uca_unit_map[prop->unit]);
}
else