tsp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tsp-devel] bb_snd_msg/bb_rcv_msg doxygen


From: Jerome Arbez-Gindre
Subject: [tsp-devel] bb_snd_msg/bb_rcv_msg doxygen
Date: Mon, 21 Jul 2008 12:19:57 +0200

Hi TSP people,

In tsp/src/util/libbb/bb_core.h, for both bb_snd_msg and bb_rcv_msg functions,
the doxygen doxumentation says:

@return BB_OK on success, BB_NOK otherwise

In fact, the real behavior implemented in bb_core.c bb_core_sysv.c and
bb_core_sysv.c follow the
msgrcv and mq_receive semantic (return the number of byte read/writen
on success, and -1 otherwise).

fortunately, BB_NOK is equal to -1.

but if the test:

            bb_rcv_msg(bb, msg) == BB_NOK
                  do what is waited...

the test:
            bb_rcv_msg(bb, msg) != BB_OK
                  does not.

in fact in the implentation... at the begining of each function, the statement :

retcode = BB_OK

misleads en the fact that BB_OK should be return.


I propose:
- Change the docygen comment.
- change the implementation and replace in these functions the BB_xxx
sementic by a -1, size semantic.

            Jerome




reply via email to

[Prev in Thread] Current Thread [Next in Thread]