Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update EBSNET port #6410

Merged
merged 1 commit into from
Jun 22, 2023
Merged

Update EBSNET port #6410

merged 1 commit into from
Jun 22, 2023

Conversation

embhorn
Copy link
Member

@embhorn embhorn commented May 15, 2023

Description

Updates to EBSNET port
Author: Sarah Richardson

Fixes zd15856

Testing

Customer tested

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@embhorn embhorn self-assigned this May 15, 2023
@embhorn embhorn requested a review from dgarske May 15, 2023 14:22
@embhorn
Copy link
Member Author

embhorn commented May 15, 2023

@dgarske - Sarah has asked me to open this PR on her behalf. I will request approval for the contributor agreement after your cursory review.

@embhorn
Copy link
Member Author

embhorn commented May 16, 2023

retest this please

@embhorn
Copy link
Member Author

embhorn commented Jun 2, 2023

@dgarske - customer is approved as a contributor. This PR is ready for review.

@dgarske dgarske assigned dgarske and unassigned embhorn Jun 20, 2023
@@ -2008,6 +2009,67 @@ int wolfSSL_CryptHwMutexUnLock(void)

return(retval);
}
#else
int rtip_semaphore_build(wolfSSL_Mutex *m)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add static.

{
int retval;

retval = vf_lseek(a, b, c);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add explicit cast to int


int strcasecmp(const char *s1, const char *s2)
{
while (rtp_tolower(*s1) == rtp_tolower(*s2))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move while brace up while() {

examples/configs/user_settings_EBSnet.h Show resolved Hide resolved
@@ -2627,8 +2627,12 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
#elif defined(HAVE_RTP_SYS) || defined(EBSNET)

#include "rtprand.h" /* rtp_rand () */

#if (defined(HAVE_RTP_SYS) || RTPLATFORM)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not assume RTPLATFORM is always defined. Should this be #if defined(HAVE_RTP_SYS) || defined(RTPLATFORM). Otherwise if RTPLATFORM is not defined it will be a compiler error. If RTPLATFORM is also an expression like RTPLATFORM != 0 please add it explicit.

@@ -244,7 +244,11 @@
#elif defined(MICRIUM)
typedef OS_MUTEX wolfSSL_Mutex;
#elif defined(EBSNET)
typedef RTP_MUTEX wolfSSL_Mutex;
#if (RTPLATFORM)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also here. Please check that it is defined.

@@ -2031,6 +2031,7 @@ int wolfSSL_CryptHwMutexUnLock(void)
}

#elif defined(EBSNET)
#if (RTPLATFORM)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You missed a few places where RTPLATFORM is used without checking if defined. Perhaps it is safe to assume if EBSNET is defined that RTPLATFORM is always defined?

s2++;
}

return rtp_tolower(*(unsigned char *) s1) - rtp_tolower(*(unsigned char *) s2);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check indent.

int strcasecmp(const char *s1, const char *s2)
{
while (rtp_tolower(*s1) == rtp_tolower(*s2)) {
if (*s1 == '\0' || *s2 == '\0')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also here. Make sure 4 spaces and no tabs.

}

#endif
int ebsnet_fseek(int a, long b, int c)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bring function ident back to align with strcasecmp?

@@ -2072,6 +2073,66 @@ int wolfSSL_CryptHwMutexUnLock(void)

return(retval);
}
#else
static int rtip_semaphore_build(wolfSSL_Mutex *m)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the ident on all functions in this group should be 4 spaces back.

@dgarske
Copy link
Contributor

dgarske commented Jun 22, 2023

Retest this please

@dgarske dgarske merged commit 3cb0b4a into wolfSSL:master Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants