remove extra spaces from ti cyassl proper files

This commit is contained in:
toddouska
2014-05-09 11:55:59 -07:00
parent ec5f3cc681
commit 34f2e51415
10 changed files with 28 additions and 22 deletions

View File

@@ -325,13 +325,13 @@ time_t mqx_time(time_t* timer)
time_t XTIME(time_t * timer) time_t XTIME(time_t * timer)
{ {
time_t sec = 0; time_t sec = 0;
sec = (time_t) MYTIME_gettime(); sec = (time_t) MYTIME_gettime();
if (timer != NULL) if (timer != NULL)
*timer = sec; *timer = sec;
return sec; return sec;
} }
#endif /* TIRTOS */ #endif /* TIRTOS */

View File

@@ -357,14 +357,14 @@ int UnLockMutex(CyaSSL_Mutex *m)
int InitMutex(CyaSSL_Mutex* m) int InitMutex(CyaSSL_Mutex* m)
{ {
Semaphore_Params params; Semaphore_Params params;
Semaphore_Params_init(&params); Semaphore_Params_init(&params);
params.mode = Semaphore_Mode_BINARY; params.mode = Semaphore_Mode_BINARY;
*m = Semaphore_create(1, &params, NULL); *m = Semaphore_create(1, &params, NULL);
return 0; return 0;
} }
int FreeMutex(CyaSSL_Mutex* m) int FreeMutex(CyaSSL_Mutex* m)
{ {
@@ -383,7 +383,7 @@ int UnLockMutex(CyaSSL_Mutex *m)
int UnLockMutex(CyaSSL_Mutex* m) int UnLockMutex(CyaSSL_Mutex* m)
{ {
Semaphore_post(*m); Semaphore_post(*m);
return 0; return 0;
} }

View File

@@ -770,8 +770,8 @@ int GenerateSeed(OS_Seed* os, byte* output, word32 sz)
if ((i % 8) == 7) { if ((i % 8) == 7) {
srand(xdc_runtime_Timestamp_get32()); srand(xdc_runtime_Timestamp_get32());
} }
} }
return 0; return 0;
} }

View File

@@ -108,7 +108,7 @@
#elif defined(CYASSL_CMSIS_RTOS) #elif defined(CYASSL_CMSIS_RTOS)
typedef osMutexId CyaSSL_Mutex; typedef osMutexId CyaSSL_Mutex;
#elif defined(TIRTOS) #elif defined(TIRTOS)
typedef ti_sysbios_knl_Semaphore_Handle CyaSSL_Mutex; typedef ti_sysbios_knl_Semaphore_Handle CyaSSL_Mutex;
#else #else
#error Need a mutex type in multithreaded mode #error Need a mutex type in multithreaded mode
#endif /* USE_WINDOWS_API */ #endif /* USE_WINDOWS_API */

View File

@@ -285,7 +285,7 @@
#define USE_CERT_BUFFERS_2048 #define USE_CERT_BUFFERS_2048
#define NO_ERROR_STRINGS #define NO_ERROR_STRINGS
#define USER_TIME #define USER_TIME
#ifdef __IAR_SYSTEMS_ICC__ #ifdef __IAR_SYSTEMS_ICC__
#pragma diag_suppress=Pa089 #pragma diag_suppress=Pa089
#elif !defined(__GNUC__) #elif !defined(__GNUC__)

View File

@@ -41,7 +41,7 @@
#include <arpa/inet.h> #include <arpa/inet.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <ti/sysbios/knl/Task.h> #include <ti/sysbios/knl/Task.h>
#define SOCKET_T int #define SOCKET_T int
#else #else
#include <string.h> #include <string.h>
#include <sys/types.h> #include <sys/types.h>
@@ -480,7 +480,7 @@ static INLINE void tcp_socket(SOCKET_T* sockfd, int udp)
if (*sockfd == INVALID_SOCKET) if (*sockfd == INVALID_SOCKET)
err_sys("socket failed\n"); err_sys("socket failed\n");
#elif defined(TIRTOS) #elif defined(TIRTOS)
if (*sockfd == -1) if (*sockfd == -1)
err_sys("socket failed\n"); err_sys("socket failed\n");
#else #else
if (*sockfd < 0) if (*sockfd < 0)

View File

@@ -108,7 +108,7 @@ THREAD_RETURN CYASSL_THREAD echoserver_test(void* args)
#if defined(NO_MAIN_DRIVER) && !defined(USE_WINDOWS_API) && \ #if defined(NO_MAIN_DRIVER) && !defined(USE_WINDOWS_API) && \
!defined(CYASSL_SNIFFER) && !defined(CYASSL_MDK_SHELL) && \ !defined(CYASSL_SNIFFER) && !defined(CYASSL_MDK_SHELL) && \
!defined(TIRTOS) !defined(TIRTOS)
port = 0; port = 0;
#endif #endif
#if defined(USE_ANY_ADDR) #if defined(USE_ANY_ADDR)

View File

@@ -977,8 +977,8 @@ THREAD_RETURN CYASSL_THREAD test_server_nofail(void* args)
int idx; int idx;
#ifdef TIRTOS #ifdef TIRTOS
fdOpenSession(TaskSelf()); fdOpenSession(TaskSelf());
#endif #endif
((func_args*)args)->return_code = TEST_FAIL; ((func_args*)args)->return_code = TEST_FAIL;
method = CyaSSLv23_server_method(); method = CyaSSLv23_server_method();
ctx = CyaSSL_CTX_new(method); ctx = CyaSSL_CTX_new(method);
@@ -1068,7 +1068,7 @@ done:
#ifdef TIRTOS #ifdef TIRTOS
fdCloseSession(TaskSelf()); fdCloseSession(TaskSelf());
#endif #endif
#ifndef TIRTOS #ifndef TIRTOS
return 0; return 0;
#endif #endif
} }

View File

@@ -192,7 +192,7 @@ static int execute_test_case(int svr_argc, char** svr_argv,
strcat(commandLine, flagSep); strcat(commandLine, flagSep);
} }
} }
#if !defined(USE_WINDOWS_API) && !defined(TIRTOS) #if !defined(USE_WINDOWS_API) && !defined(TIRTOS)
/* add port 0 */ /* add port 0 */
if (svr_argc + 2 > MAX_ARGS) if (svr_argc + 2 > MAX_ARGS)
printf("cannot add the magic port number flag to server\n"); printf("cannot add the magic port number flag to server\n");

View File

@@ -57,12 +57,18 @@ enum {
int myoptind = 0; int myoptind = 0;
char* myoptarg = NULL; char* myoptarg = NULL;
#ifndef NO_TESTSUITE_MAIN_DRIVER #ifndef NO_TESTSUITE_MAIN_DRIVER
int main(int argc, char** argv)
{ static int testsuite_test(int argc, char** argv);
return testsuite_test(argc, argv);
} int main(int argc, char** argv)
#endif {
return testsuite_test(argc, argv);
}
#endif /* NO_TESTSUITE_MAIN_DRIVER */
int testsuite_test(int argc, char** argv) int testsuite_test(int argc, char** argv)
{ {
@@ -172,7 +178,7 @@ int testsuite_test(int argc, char** argv)
#ifdef TIRTOS #ifdef TIRTOS
fdCloseSession(TaskSelf()); fdCloseSession(TaskSelf());
#endif #endif
#ifdef HAVE_CAVIUM #ifdef HAVE_CAVIUM
CspShutdown(CAVIUM_DEV_ID); CspShutdown(CAVIUM_DEV_ID);
#endif #endif