зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1308105 - Replace PL_strpbrk with strpbrk r=xpcom-reviewers,kmag
Differential Revision: https://phabricator.services.mozilla.com/D116933
This commit is contained in:
Родитель
3e16d1a31d
Коммит
cd8acaa740
|
@ -350,7 +350,7 @@ int32_t nsJAR::ReadLine(const char** src) {
|
|||
//--Moves pointer to beginning of next line and returns line length
|
||||
// not including CR/LF.
|
||||
int32_t length;
|
||||
char* eol = PL_strpbrk(*src, "\r\n");
|
||||
const char* eol = strpbrk(*src, "\r\n");
|
||||
|
||||
if (eol == nullptr) // Probably reached end of file before newline
|
||||
{
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
#include "mozpkix/pkix.h"
|
||||
#include "mozpkix/pkixnss.h"
|
||||
#include "mozpkix/pkixutil.h"
|
||||
#include "plstr.h"
|
||||
#include "secerr.h"
|
||||
#include "secmime.h"
|
||||
|
||||
|
@ -277,7 +276,7 @@ nsresult ReadLine(/*in/out*/ const char*& nextLineStart,
|
|||
size_t previousLength = 0;
|
||||
size_t currentLength = 0;
|
||||
for (;;) {
|
||||
const char* eol = PL_strpbrk(nextLineStart, "\r\n");
|
||||
const char* eol = strpbrk(nextLineStart, "\r\n");
|
||||
|
||||
if (!eol) { // Reached end of file before newline
|
||||
eol = nextLineStart + strlen(nextLineStart);
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#include "mozilla/TextUtils.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsCRT.h"
|
||||
#include "plstr.h"
|
||||
#include "nsASCIIMask.h"
|
||||
|
||||
static const char hexCharsUpper[] = "0123456789ABCDEF";
|
||||
|
@ -181,8 +180,8 @@ int32_t nsUnescapeCount(char* aStr)
|
|||
c2[0] = *(src + 2);
|
||||
}
|
||||
|
||||
if (*src != HEX_ESCAPE || PL_strpbrk(pc1, hexCharsUpperLower) == 0 ||
|
||||
PL_strpbrk(pc2, hexCharsUpperLower) == 0) {
|
||||
if (*src != HEX_ESCAPE || strpbrk(pc1, hexCharsUpperLower) == nullptr ||
|
||||
strpbrk(pc2, hexCharsUpperLower) == nullptr) {
|
||||
*dst++ = *src++;
|
||||
} else {
|
||||
src++; /* walk over escape */
|
||||
|
|
Загрузка…
Ссылка в новой задаче