diff --git a/acdb/ats/adie/common/src/ats_adie_rtc.c b/acdb/ats/adie/common/src/ats_adie_rtc.c index 2b217b54..c8f96b0d 100644 --- a/acdb/ats/adie/common/src/ats_adie_rtc.c +++ b/acdb/ats/adie/common/src/ats_adie_rtc.c @@ -244,7 +244,7 @@ int32_t ats_adie_get_multiple_register( if (rsp_buf_size < *rsp_buf_bytes_filled) { ATS_ERR("Error[%d]: Not enough memory to copy response. " - "The memory avalible is %d bytes and the size needed is &d bytes", + "The memory available is %d bytes and the size needed is &d bytes", AR_ENEEDMORE, rsp_buf_size, *rsp_buf_bytes_filled); } diff --git a/acdb/ats/fts/common/src/ats_fts.c b/acdb/ats/fts/common/src/ats_fts.c index bf6de662..e1a4ebe4 100644 --- a/acdb/ats/fts/common/src/ats_fts.c +++ b/acdb/ats/fts/common/src/ats_fts.c @@ -65,7 +65,7 @@ int32_t fts_open_file( ATS_DBG("Opening/creating %s...", req.file_path); - //Search for avalible file slot + //Search for available file slot for (; findex < FTS_MAX_FILE_COUNT; findex++) if (fts_file_table->fhandle[findex] == NULL) break; diff --git a/acdb/ats/src/ats_command.c b/acdb/ats/src/ats_command.c index 41761cb1..32dcad1f 100644 --- a/acdb/ats/src/ats_command.c +++ b/acdb/ats/src/ats_command.c @@ -86,7 +86,7 @@ int32_t AtsCmdGetHeapEntryInfo( if (AR_FAILED(status)) { - ATS_ERR("Error[%d]: Faild to get information from the ACDB heap", + ATS_ERR("Error[%d]: Failed to get information from the ACDB heap", status); } return status; @@ -110,7 +110,7 @@ int32_t AtsCmdGetHeapEntryData(acdb_handle_t acdb_handle, status = DataProcGetHeapData(key_vector, rsp, &rsp_offset); if (AR_FAILED(status)) { - ATS_ERR("Faild to get heap data for key vector"); + ATS_ERR("Failed to get heap data for key vector"); } rsp->bytes_filled = rsp_offset; diff --git a/acdb/ats/transports/tcpip/linux/src/ats_server.cpp b/acdb/ats/transports/tcpip/linux/src/ats_server.cpp index 8bd5a921..21d15ab3 100644 --- a/acdb/ats/transports/tcpip/linux/src/ats_server.cpp +++ b/acdb/ats/transports/tcpip/linux/src/ats_server.cpp @@ -519,7 +519,7 @@ void* ats_server_transmit_routine(void* client_socket_ptr) while (true) { //keep listening for whole incoming messages - int32_t bytes_recieved = 0; + int32_t bytes_received = 0; uint32_t headerBytesRead = 0; uint32_t msg_len = 0; //--------------------------- @@ -532,7 +532,7 @@ void* ats_server_transmit_routine(void* client_socket_ptr) { //receive full message header ATS_ERR("Waiting to recieve message..."); - bytes_recieved = recv(client_socket, recvbuf, ATS_HEADER_LENGTH - headerBytesRead, 0); + bytes_received = recv(client_socket, recvbuf, ATS_HEADER_LENGTH - headerBytesRead, 0); //client sends "QUIT" to signal end of connection. At that point, close socket and return. if (strncmp(recvbuf, ATS_SERVER_CMD_QUIT, 4) == 0) @@ -543,25 +543,25 @@ void* ats_server_transmit_routine(void* client_socket_ptr) goto threaddone; } - if (bytes_recieved > 0) + if (bytes_received > 0) { - ATS_DBG("Recieved %d bytes", bytes_recieved); - ACDB_MEM_CPY_SAFE(msgBuf + headerBytesRead, bytes_recieved, recvbuf, bytes_recieved); - headerBytesRead += bytes_recieved; + ATS_DBG("Received %d bytes", bytes_received); + ACDB_MEM_CPY_SAFE(msgBuf + headerBytesRead, bytes_received, recvbuf, bytes_received); + headerBytesRead += bytes_received; //this determines how many bytes to expect (thus determining how many times to loop). - if (get_command_length_s(msgBuf, bytes_recieved, &msg_len)) + if (get_command_length_s(msgBuf, bytes_received, &msg_len)) { svc_cmd_id = 0; ACDB_MEM_CPY_SAFE(&svc_cmd_id, ATS_SERVICE_COMMAND_ID_LENGTH, msgBuf + ATS_SERVICE_COMMAND_ID_POSITION, ATS_SERVICE_COMMAND_ID_LENGTH); ATS_SERVICE_ID_STR(svc_id_str, ATS_SEVICE_ID_STR_LEN, svc_cmd_id); - ATS_ERR("Recieved Command[%s-%d] with length %d bytes", svc_id_str, ATS_GET_COMMAND_ID(svc_cmd_id), msg_len); + ATS_ERR("Received Command[%s-%d] with length %d bytes", svc_id_str, ATS_GET_COMMAND_ID(svc_cmd_id), msg_len); break; } } - else if (bytes_recieved <= 0) + else if (bytes_received <= 0) { if (errno == EINTR) continue; @@ -587,17 +587,17 @@ void* ats_server_transmit_routine(void* client_socket_ptr) uint32_t recv_len = remaining_recv_len > ATS_RECIEVE_BUF_SIZE ? remaining_recv_len : ATS_RECIEVE_BUF_SIZE; //will receive min(ATS_RECIEVE_BUF_SIZE, bytes left to receive to complete message) - bytes_recieved = recv(client_socket, recvbuf, recv_len, 0); + bytes_received = recv(client_socket, recvbuf, recv_len, 0); - if (bytes_recieved > 0) { - ATS_ERR("Recieved %d bytes", bytes_recieved); - ACDB_MEM_CPY_SAFE(msgBuf + ATS_HEADER_LENGTH + payload_bytes_read, bytes_recieved, recvbuf, bytes_recieved); - payload_bytes_read += bytes_recieved; + if (bytes_received > 0) { + ATS_ERR("Received %d bytes", bytes_received); + ACDB_MEM_CPY_SAFE(msgBuf + ATS_HEADER_LENGTH + payload_bytes_read, bytes_received, recvbuf, bytes_received); + payload_bytes_read += bytes_received; if (payload_bytes_read == msg_len) { break; } } - else if (bytes_recieved <= 0) { + else if (bytes_received <= 0) { if (errno == EINTR) { ATS_ERR("Signal interrupt. Continuing..."); continue; diff --git a/acdb/ats/transports/tcpip_server/src/tcpip_cmd_server.cpp b/acdb/ats/transports/tcpip_server/src/tcpip_cmd_server.cpp index 44d66149..ae7eafcd 100644 --- a/acdb/ats/transports/tcpip_server/src/tcpip_cmd_server.cpp +++ b/acdb/ats/transports/tcpip_server/src/tcpip_cmd_server.cpp @@ -552,7 +552,7 @@ int32_t TcpipCmdServer::recv_message_header(char_t *msgBuf, uint32_t msgbuflen, char_t *recvbuf, uint32_t recvbuflen, uint32_t &msg_len) { int32_t status = AR_EOK; - int32_t bytes_recieved = 0; + int32_t bytes_received = 0; int32_t headerBytesRead = 0; char svc_id_str[ATS_SEVICE_ID_STR_LEN] = { 0 }; uint32_t svc_cmd_id = 0; @@ -566,9 +566,9 @@ int32_t TcpipCmdServer::recv_message_header(char_t *msgBuf, uint32_t msgbuflen, { return AR_EBADPARAM; } - status = ar_socket_recv(accept_socket, recvbuf, ATS_HEADER_LENGTH - headerBytesRead, 0, &bytes_recieved); + status = ar_socket_recv(accept_socket, recvbuf, ATS_HEADER_LENGTH - headerBytesRead, 0, &bytes_received); - if (bytes_recieved < 0) + if (bytes_received < 0) { if (AR_SOCKET_LAST_ERROR == EINTR) continue; @@ -576,14 +576,14 @@ int32_t TcpipCmdServer::recv_message_header(char_t *msgBuf, uint32_t msgbuflen, ar_socket_close(accept_socket); return AR_EFAILED; } - else if (bytes_recieved == 0) + else if (bytes_received == 0) { TCPIP_CMD_SVR_INFO("Client shutdown socket. Closing connection..."); ar_socket_close(accept_socket); return AR_ETERMINATED; } - TCPIP_CMD_SVR_DBG("Recieved %d bytes", bytes_recieved); + TCPIP_CMD_SVR_DBG("Received %d bytes", bytes_received); /* The client sends "QUIT" to signal end of connection. The server will close * the socket and return */ @@ -598,18 +598,18 @@ int32_t TcpipCmdServer::recv_message_header(char_t *msgBuf, uint32_t msgbuflen, { return AR_EBADPARAM; } - ar_mem_cpy(msgBuf + headerBytesRead, bytes_recieved, recvbuf, bytes_recieved); - headerBytesRead += bytes_recieved; + ar_mem_cpy(msgBuf + headerBytesRead, bytes_received, recvbuf, bytes_received); + headerBytesRead += bytes_received; //this determines how many bytes to expect (thus determining how many times to loop). - if (tcpip_cmd_server_get_ats_command_length(msgBuf, bytes_recieved, &msg_len)) + if (tcpip_cmd_server_get_ats_command_length(msgBuf, bytes_received, &msg_len)) { svc_cmd_id = 0; ar_mem_cpy(&svc_cmd_id, ATS_SERVICE_COMMAND_ID_LENGTH, msgBuf + ATS_SERVICE_COMMAND_ID_POSITION, ATS_SERVICE_COMMAND_ID_LENGTH); ATS_SERVICE_ID_STR(svc_id_str, ATS_SEVICE_ID_STR_LEN, svc_cmd_id); - TCPIP_CMD_SVR_DBG("Recieved Command[%s-%d] with length %d bytes", svc_id_str, ATS_GET_COMMAND_ID(svc_cmd_id), msg_len); + TCPIP_CMD_SVR_DBG("Received Command[%s-%d] with length %d bytes", svc_id_str, ATS_GET_COMMAND_ID(svc_cmd_id), msg_len); break; } } @@ -624,7 +624,7 @@ int32_t TcpipCmdServer::recv_message(char_t *msgBuf, uint32_t msgbuflen, { __UNREFERENCED_PARAM(recvbuflen); int32_t status = AR_EOK; - int32_t bytes_recieved = 0; + int32_t bytes_received = 0; uint32_t message_bytes_read = 0; uint32_t remaining_message_length = 0; uint32_t recv_len = 0; @@ -659,11 +659,11 @@ int32_t TcpipCmdServer::recv_message(char_t *msgBuf, uint32_t msgbuflen, remaining_message_length : TCPIP_CMD_SERVER_RECV_BUFFER_SIZE; //will receive min(TCPIP_CMD_SERVER_RECV_BUFFER_SIZE, bytes left to receive to complete message) - bytes_recieved = recv(accept_socket, recvbuf, recv_len, 0); + bytes_received = recv(accept_socket, recvbuf, recv_len, 0); - if (bytes_recieved > 0) + if (bytes_received > 0) { - TCPIP_CMD_SVR_DBG("Recieved %d bytes", bytes_recieved); + TCPIP_CMD_SVR_DBG("Received %d bytes", bytes_received); if (should_write_msg) { @@ -675,17 +675,17 @@ int32_t TcpipCmdServer::recv_message(char_t *msgBuf, uint32_t msgbuflen, return AR_ENEEDMORE; } - ar_mem_cpy(msgBuf + ATS_HEADER_LENGTH + message_bytes_read, bytes_recieved, - recvbuf, bytes_recieved); + ar_mem_cpy(msgBuf + ATS_HEADER_LENGTH + message_bytes_read, bytes_received, + recvbuf, bytes_received); } - message_bytes_read += bytes_recieved; + message_bytes_read += bytes_received; if (message_bytes_read == data_length) { break; } } - else if (bytes_recieved <= 0) + else if (bytes_received <= 0) { if (AR_SOCKET_LAST_ERROR == EINTR) { diff --git a/acdb/inc/acdb_delta_parser.h b/acdb/inc/acdb_delta_parser.h index c62589a5..f2a3b343 100644 --- a/acdb/inc/acdb_delta_parser.h +++ b/acdb/inc/acdb_delta_parser.h @@ -53,7 +53,7 @@ struct _acdb_delta_file_man_file_info_t { uint32_t acdb_file_index; /**< A flag indicating whether the delta file is updated */ uint32_t is_updated; - /**< A flag that determines the existance of the delta file */ + /**< A flag that determines the existence of the delta file */ uint32_t exists; /**< The size of the delta file */ uint32_t file_size; diff --git a/acdb/inc/acdb_utility.h b/acdb/inc/acdb_utility.h index 867b293b..c8185ba9 100644 --- a/acdb/inc/acdb_utility.h +++ b/acdb/inc/acdb_utility.h @@ -50,7 +50,7 @@ #define ACDB_FREE(data) AcdbFree((void*)data) -//TODO: Remove this function once its avalible in the OSAL +//TODO: Remove this function once its available in the OSAL #ifndef ar_sscanf #if defined(_WIN64) || defined(_WIN32) #define ar_sscanf(buf, format, ...) sscanf_s(buf, format, __VA_ARGS__) diff --git a/acdb/src/acdb.c b/acdb/src/acdb.c index e5352b2c..44119199 100644 --- a/acdb/src/acdb.c +++ b/acdb/src/acdb.c @@ -842,7 +842,7 @@ int32_t acdb_cmd_set_temp_path(AcdbSetTempPathReq *req) else if (AR_FAILED(status)) { ACDB_ERR("Error[%d]: An error occured while trying to verify" - " the existance of the following path %s", status, + " the existence of the following path %s", status, &swap_finfo.path_info.path[0]); return status; } diff --git a/acdb/src/acdb_command.c b/acdb/src/acdb_command.c index 794e439d..4ad036d1 100644 --- a/acdb/src/acdb_command.c +++ b/acdb/src/acdb_command.c @@ -11193,7 +11193,7 @@ int32_t AcdbZip1(uint32_t num_elem_1, uint32_t *list_1, /** * \brief -* Checks for the existance of a CKV within the lookup table +* Checks for the existence of a CKV within the lookup table * * \param[in] kv_list: contains the key id and value lists that are * used to compare against an entry in the lookup table @@ -13867,7 +13867,7 @@ int32_t AcdbGetParameterCalData(AcdbParameterCalData *req, AcdbBlob* rsp) if (AR_FAILED(status)) { //Either CKV not found or another error occured - ACDB_ERR("Error[%d]: Could not find a matcing CKV.", status); + ACDB_ERR("Error[%d]: Could not find a matching CKV.", status); return status; } diff --git a/acdb/src/acdb_delta_file_mgr.c b/acdb/src/acdb_delta_file_mgr.c index 22ff52f1..eac4194f 100644 --- a/acdb/src/acdb_delta_file_mgr.c +++ b/acdb/src/acdb_delta_file_mgr.c @@ -54,7 +54,7 @@ struct _acdb_delta_file_man_database_info_t { uint32_t acdb_file_index; /**< A flag indicating whether the delta file is updated */ uint32_t is_updated; - /**< A flag that determines the existance of the delta file */ + /**< A flag that determines the existence of the delta file */ uint32_t exists; /**< The size of the delta file */ uint32_t file_size; diff --git a/acdb/src/acdb_file_mgr.c b/acdb/src/acdb_file_mgr.c index 024845b7..6a099d29 100644 --- a/acdb/src/acdb_file_mgr.c +++ b/acdb/src/acdb_file_mgr.c @@ -185,11 +185,11 @@ int32_t AcdbFileManRemoveDatabase(acdb_file_man_handle_t* fm_handle); /** * \brief * 1. Comparing Imports to Exports -* Checks for the existance of imports in the newly added +* Checks for the existence of imports in the newly added * database compared to the exports in existing databases * * 2. Comparing Exports to Imports -* Checks for the existance of exports in the newly added +* Checks for the existence of exports in the newly added * database compared to the imports in existing databases * * If subgraphs are found between the new database and the @@ -1147,7 +1147,7 @@ int32_t AcdbFileManGetHostDatabaseFileInfo(AcdbFileManBlob* rsp) if (sz_file_info_rsp > rsp->size) { - ACDB_ERR("Error[%d]: There isnt enough memory to " + ACDB_ERR("Error[%d]: There isn't enough memory to " "copy file information", AR_ENOMEMORY); return AR_ENOMEMORY; } @@ -1295,7 +1295,7 @@ int32_t AcdbFileManGetAllDatabasesFileInfo(AcdbFileManBlob* rsp) if (sz_file_info_rsp > rsp->size) { - ACDB_ERR("Error[%d]: There isnt enough memory to " + ACDB_ERR("Error[%d]: There isn't enough memory to " "copy file information", AR_ENOMEMORY); return AR_ENOMEMORY; } diff --git a/acdb/src/acdb_heap.c b/acdb/src/acdb_heap.c index 8819e75b..b4cabcd5 100644 --- a/acdb/src/acdb_heap.c +++ b/acdb/src/acdb_heap.c @@ -833,7 +833,7 @@ int32_t acdb_heap_add_database(uint32_t vm_id, acdb_heap_handle_t *handle) ACDB_MUTEX_LOCK(acdb_heap_context.heap_lock); - /* find next avalible slot */ + /* find next available slot */ for (index = 0; index < MAX_ACDB_FILE_COUNT; index++) { if (IsNull(acdb_heap_context.heap_info[index])) diff --git a/acdb/src/acdb_init.c b/acdb/src/acdb_init.c index e103b25d..4ee3514e 100644 --- a/acdb/src/acdb_init.c +++ b/acdb/src/acdb_init.c @@ -272,7 +272,7 @@ int32_t acdb_init_add_database(acdb_init_database_paths_t *database_paths, uint32_t remaining_file_slots = 0; uint32_t num_data_files = 0; bool_t should_ignore_delta_file = FALSE; - bool_t is_writable_path_avalible = FALSE; + bool_t is_writable_path_available = FALSE; acdb_file_version_t acdb_file_version = { 0 }; AcdbFileManFileInfo *fm_file_info = NULL; AcdbDeltaFileManFileInfo *dfm_file_info = NULL; @@ -289,7 +289,7 @@ int32_t acdb_init_add_database(acdb_init_database_paths_t *database_paths, if (database_paths->num_files > ACDB_MAX_FILE_ADD_LIMIT) { - ACDB_ERR("Error[%d]: The max number of files that can be initalized " + ACDB_ERR("Error[%d]: The max number of files that can be initialized " "is %d: one *.qwsp and one *.acdb", AR_EBADPARAM, ACDB_MAX_FILE_ADD_LIMIT); return AR_EBADPARAM; @@ -305,7 +305,7 @@ int32_t acdb_init_add_database(acdb_init_database_paths_t *database_paths, goto end; } - is_writable_path_avalible = !IsNull(database_paths->writable_path.path); + is_writable_path_available = !IsNull(database_paths->writable_path.path); fm_db_files.num_files = database_paths->num_files; fm_file_info = ACDB_MALLOC( @@ -353,7 +353,7 @@ int32_t acdb_init_add_database(acdb_init_database_paths_t *database_paths, num_data_files++; /* Load delta file */ - if (is_writable_path_avalible) + if (is_writable_path_available) { status = AcdbInitLoadDeltaFile( &fm_file_info[i], &acdb_file_version, @@ -391,7 +391,7 @@ int32_t acdb_init_add_database(acdb_init_database_paths_t *database_paths, (uint8_t*)&fm_ctx_handle.vm_id, sizeof(uint32_t), (uint8_t*)&ctx_handle.heap_handle, sizeof(acdb_heap_handle_t)); - if (is_writable_path_avalible && !should_ignore_delta_file) + if (is_writable_path_available && !should_ignore_delta_file) { dfm_file_info[i].vm_id = fm_ctx_handle.vm_id; dfm_file_info[i].acdb_file_index = findex; @@ -423,7 +423,7 @@ int32_t acdb_init_add_database(acdb_init_database_paths_t *database_paths, /* Load the contents of the delta file into the heap */ - if (is_writable_path_avalible && !should_ignore_delta_file) + if (is_writable_path_available && !should_ignore_delta_file) { uint32_t delta_status = acdb_delta_data_ioctl(ACDB_DELTA_DATA_CMD_INIT_HEAP, &ctx_handle, sizeof(acdb_context_handle_t), @@ -435,7 +435,7 @@ int32_t acdb_init_add_database(acdb_init_database_paths_t *database_paths, } } - if (is_writable_path_avalible) + if (is_writable_path_available) { /* The delta file path serves two purposes: * 1. to store the delta files diff --git a/gsl/src/gsl_common.c b/gsl/src/gsl_common.c index 711980e7..6dc8ed59 100644 --- a/gsl/src/gsl_common.c +++ b/gsl/src/gsl_common.c @@ -279,7 +279,7 @@ int32_t gsl_send_spf_cmd_wait_for_basic_rsp(gpr_packet_t **packet, if (!rc && rsp && rsp->opcode == GPR_IBASIC_RSP_RESULT) { basic_rsp = GPR_PKT_GET_PAYLOAD(struct spf_cmd_basic_rsp, rsp); if (cached_opcode != basic_rsp->opcode) { - GSL_ERR("Recieved unexpected rsp opcode %x, expected %x", + GSL_ERR("Received unexpected rsp opcode %x, expected %x", basic_rsp->opcode, cached_opcode); rc = AR_EUNEXPECTED; } diff --git a/gsl/src/gsl_cshm_mgr.c b/gsl/src/gsl_cshm_mgr.c index 720ce148..2b324416 100644 --- a/gsl/src/gsl_cshm_mgr.c +++ b/gsl/src/gsl_cshm_mgr.c @@ -294,7 +294,7 @@ static int32_t gsl_cshm_handle_rsp(gpr_packet_t *rsp, uint32_t expected_opcode) }; if (expected_opcode != rsp->opcode) { - GSL_ERR("Recieved unexpected rsp opcode %x, expected %x", + GSL_ERR("Received unexpected rsp opcode %x, expected %x", rsp->opcode, expected_opcode); rc = AR_EUNEXPECTED; } diff --git a/gsl/src/gsl_shmem_mgr.c b/gsl/src/gsl_shmem_mgr.c index 7ca3a047..53267975 100644 --- a/gsl/src/gsl_shmem_mgr.c +++ b/gsl/src/gsl_shmem_mgr.c @@ -276,7 +276,7 @@ static int32_t gsl_shmem_handle_rsp(gpr_packet_t *rsp, uint32_t master_proc_id, struct spf_cmd_basic_rsp *basic_rsp; int32_t rc = AR_EOK; if (expected_opcode != rsp->opcode) { - GSL_ERR("Recieved unexpected rsp opcode %x, expected %x", + GSL_ERR("Received unexpected rsp opcode %x, expected %x", rsp->opcode, expected_opcode); rc = AR_EUNEXPECTED; goto end;