pkarashchenko commented on code in PR #1344: URL: https://github.com/apache/incubator-nuttx-apps/pull/1344#discussion_r992100633
########## examples/pipe/interlock_test.c: ########## @@ -86,10 +89,12 @@ static void *null_writer(pthread_addr_t pvarg) { fprintf(stderr, "null_writer: close failed: %d\n", errno); } + sleep(5); printf("null_writer: Returning success\n"); - return (void*)0; + p = (void *) 0; Review Comment: ```suggestion p = (void *)0; ``` ########## examples/pipe/interlock_test.c: ########## @@ -177,21 +194,24 @@ int interlock_test(void) ret = pthread_join(writerid, &value); if (ret != 0) { - fprintf(stderr, "interlock_test: pthread_join failed, error=%d\n", ret); + fprintf(stderr, \ + "interlock_test: pthread_join failed, error=%d\n", ret); ret = 6; goto errout_with_fifo; } else { - printf("interlock_test: writer returned %d\n", (int)value); - if (value != (void*)0) + printf("interlock_test: writer returned %p\n", value); + p = (void *) 0; Review Comment: ```suggestion p = (void *)0; ``` ########## examples/pipe/interlock_test.c: ########## @@ -69,9 +70,11 @@ static void *null_writer(pthread_addr_t pvarg) fd = open(FIFO_PATH2, O_WRONLY); if (fd < 0) { - fprintf(stderr, "null_writer: Failed to open FIFO %s for writing, errno=%d\n", + fprintf(stderr, \ + "null_writer: Failed to open FIFO %s for writing, errno=%d\n", FIFO_PATH2, errno); - return (void*)1; + p = (void *) 1; Review Comment: ```suggestion p = (void *)1; ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org