diff options
author | Jeff Walden <jwalden@mit.edu> | 2020-05-19 20:09:44 +0000 |
---|---|---|
committer | Jeff Walden <jwalden@mit.edu> | 2020-05-19 20:09:44 +0000 |
commit | 8bc0343af3cd816df077a1582f1d678864a68a9a (patch) | |
tree | c13f717b72d448b34019cba8b2e3706c5ee70d39 /cmd/lib | |
parent | 6bfb610be4ffc1db0f0dafa9c67c1b6743b429ad (diff) | |
download | nss-hg-8bc0343af3cd816df077a1582f1d678864a68a9a.tar.gz |
Bug 1639033 - Fix signed-unsigned comparison warning in basicutil.c. r=kjacobs
Differential Revision: https://phabricator.services.mozilla.com/D75840
Diffstat (limited to 'cmd/lib')
-rw-r--r-- | cmd/lib/basicutil.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/lib/basicutil.c b/cmd/lib/basicutil.c index de56fbdd9..345e970ad 100644 --- a/cmd/lib/basicutil.c +++ b/cmd/lib/basicutil.c @@ -17,6 +17,7 @@ #include "basicutil.h" #include <stdarg.h> +#include <stddef.h> #include <sys/stat.h> #include <errno.h> @@ -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); } |