mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Use BUFFER_SIZE constant for all buffer lengths
This commit is contained in:
@@ -113,7 +113,7 @@ void NativeHandler::Read(const CefString& name, CefRefPtr<CefV8Value> object,
|
||||
if (fd < 0)
|
||||
return;
|
||||
|
||||
char buffer[8192];
|
||||
char buffer[BUFFER_SIZE];
|
||||
int r;
|
||||
string value;
|
||||
while ((r = read(fd, buffer, sizeof buffer)) > 0)
|
||||
@@ -457,7 +457,7 @@ void NativeHandler::Digest(const CefString& name, CefRefPtr<CefV8Value> object,
|
||||
EVP_MD_CTX_init(&context);
|
||||
EVP_DigestInit_ex(&context, md, NULL);
|
||||
|
||||
char buffer[8192];
|
||||
char buffer[BUFFER_SIZE];
|
||||
int r;
|
||||
while ((r = read(fd, buffer, sizeof buffer)) > 0)
|
||||
EVP_DigestUpdate(&context, buffer, r);
|
||||
|
||||
Reference in New Issue
Block a user