The expression "*pi++" post-increments the pointer (not the value).
---
.../libbsp/sparc/shared/amba/ambapp_find_by_idx.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/c/src/lib/libbsp/sparc/shared/amba/ambapp_find_by_idx.c
b/c/src/lib/libbsp/sparc/shared/amba/ambapp_find_by_idx.c
index 7c6db62..d524a3c 100644
--- a/c/src/lib/libbsp/sparc/shared/amba/ambapp_find_by_idx.c
+++ b/c/src/lib/libbsp/sparc/shared/amba/ambapp_find_by_idx.c
@@ -28,7 +28,7 @@ int ambapp_find_by_idx(struct ambapp_dev *dev, int index,
void *pcount)
int *pi = pcount;
if (pi) {
- if (*pi-- == 0)
+ if ((*pi)-- == 0)
return (int)dev;
else
return 0;
--
1.7.7
_______________________________________________
rtems-devel mailing list
[email protected]
http://www.rtems.org/mailman/listinfo/rtems-devel