Skip to content

Commit

Permalink
Bug 1639033 - Fix signed-unsigned comparison warning in basicutil.c. …
Browse files Browse the repository at this point in the history
…r=kjacobs

Differential Revision: https://phabricator.services.mozilla.com/D75840

--HG--
extra : moz-landing-system : lando
  • Loading branch information
jswalden committed May 19, 2020
1 parent 2930de7 commit 35696b7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/lib/basicutil.c
Expand Up @@ -17,6 +17,7 @@

#include "basicutil.h"
#include <stdarg.h>
#include <stddef.h>
#include <sys/stat.h>
#include <errno.h>

Expand Down Expand Up @@ -632,7 +633,8 @@ void
SECU_PrintPRandOSError(const char *progName)
{
char buffer[513];
PRInt32 errLen = PR_GetErrorTextLength();
PRInt32 errLenInt = PR_GetErrorTextLength();
size_t errLen = errLenInt < 0 ? 0 : (size_t)errLenInt;
if (errLen > 0 && errLen < sizeof buffer) {
PR_GetErrorText(buffer);
}
Expand Down

0 comments on commit 35696b7

Please sign in to comment.