This is good. Had to do the same myself.

Daniel


On 02/11/2014 10:10 AM, Sebastian Huber wrote:
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;


--
Daniel Hellstrom
Software Section Head
Aeroflex Gaisler AB
Aeroflex Microelectronic Solutions – HiRel
Kungsgatan 12
SE-411 19 Gothenburg, Sweden
Phone: +46 31 7758657
dan...@gaisler.com
www.Aeroflex.com/Gaisler

_______________________________________________
rtems-devel mailing list
rtems-devel@rtems.org
http://www.rtems.org/mailman/listinfo/rtems-devel

Reply via email to