[rtems commit] sp13/task1.c: Remove warning for misleading indentation
Joel Sherrill
joel at rtems.org
Thu Mar 24 16:58:38 UTC 2016
Module: rtems
Branch: master
Commit: b66394df632e703fecb536e356fdad27291c7fbc
Changeset: http://git.rtems.org/rtems/commit/?id=b66394df632e703fecb536e356fdad27291c7fbc
Author: Joel Sherrill <joel at rtems.org>
Date: Tue Mar 22 10:17:41 2016 -0500
sp13/task1.c: Remove warning for misleading indentation
Fix a block of off-by-one indentation and add braces to clarify
intention.
---
testsuites/sptests/sp13/task1.c | 39 ++++++++++++++++++++-------------------
1 file changed, 20 insertions(+), 19 deletions(-)
diff --git a/testsuites/sptests/sp13/task1.c b/testsuites/sptests/sp13/task1.c
index e104e8d..c27beda 100644
--- a/testsuites/sptests/sp13/task1.c
+++ b/testsuites/sptests/sp13/task1.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-2011.
+ * COPYRIGHT (c) 1989-2011, 2016.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -339,28 +339,29 @@ rtems_test_pause();
RTEMS_DEFAULT_OPTIONS,
1 * rtems_clock_get_ticks_per_second()
);
- directive_failed(status, "rtems_message_queue_receive exact size");
- if (size != queue_size) {
- puts("TA1 - exact size size match failed");
- rtems_test_exit(1);
- }
-
- if (memcmp(big_send_buffer, big_receive_buffer, size) != 0) {
- puts("TA1 - exact size data match failed");
- rtems_test_exit(1);
- }
+ directive_failed(status, "rtems_message_queue_receive exact size");
+ if (size != queue_size) {
+ puts("TA1 - exact size size match failed");
+ rtems_test_exit(1);
+ }
- for (cp = (big_receive_buffer + size);
- cp < (big_receive_buffer + sizeof(big_receive_buffer));
- cp++)
- if (*cp != 'Z') {
- puts("TA1 - exact size overrun match failed");
+ if (memcmp(big_send_buffer, big_receive_buffer, size) != 0) {
+ puts("TA1 - exact size data match failed");
rtems_test_exit(1);
}
- /* all done with this one; delete it */
- status = rtems_message_queue_delete( Queue_id[ 1 ] );
- directive_failed( status, "rtems_message_queue_delete" );
+ for (cp = (big_receive_buffer + size);
+ cp < (big_receive_buffer + sizeof(big_receive_buffer));
+ cp++) {
+ if (*cp != 'Z') {
+ puts("TA1 - exact size overrun match failed");
+ rtems_test_exit(1);
+ }
+ }
+
+ /* all done with this one; delete it */
+ status = rtems_message_queue_delete( Queue_id[ 1 ] );
+ directive_failed( status, "rtems_message_queue_delete" );
}
TEST_END();
More information about the vc
mailing list