Fix some nits in fpdf_edit code.

Give variables more consistent names and fix a typo.

Change-Id: Ic321f23bf42bc5ddb42b7b8b18f1dc7b9917e188
Reviewed-on: https://pdfium-review.googlesource.com/c/48455
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/fpdfsdk/fpdf_edit_embeddertest.cpp b/fpdfsdk/fpdf_edit_embeddertest.cpp
index 5b8251b..02e7cc9 100644
--- a/fpdfsdk/fpdf_edit_embeddertest.cpp
+++ b/fpdfsdk/fpdf_edit_embeddertest.cpp
@@ -197,7 +197,7 @@
 TEST_F(FPDFEditEmbedderTest, RasterizePDF) {
   const char kAllBlackMd5sum[] = "5708fc5c4a8bd0abde99c8e8f0390615";
 
-  // Get the bitmap for the original document/
+  // Get the bitmap for the original document.
   ScopedFPDFBitmap orig_bitmap;
   {
     EXPECT_TRUE(OpenDocument("black.pdf"));
diff --git a/fpdfsdk/fpdf_editimg.cpp b/fpdfsdk/fpdf_editimg.cpp
index 8282eeb..eae3f32 100644
--- a/fpdfsdk/fpdf_editimg.cpp
+++ b/fpdfsdk/fpdf_editimg.cpp
@@ -60,27 +60,27 @@
 }
 
 bool LoadJpegHelper(FPDF_PAGE* pages,
-                    int nCount,
+                    int count,
                     FPDF_PAGEOBJECT image_object,
-                    FPDF_FILEACCESS* fileAccess,
-                    bool inlineJpeg) {
+                    FPDF_FILEACCESS* file_access,
+                    bool inline_jpeg) {
   CPDF_ImageObject* pImgObj = CPDFImageObjectFromFPDFPageObject(image_object);
   if (!pImgObj)
     return false;
 
-  if (!fileAccess)
+  if (!file_access)
     return false;
 
   if (pages) {
-    for (int index = 0; index < nCount; index++) {
+    for (int index = 0; index < count; index++) {
       CPDF_Page* pPage = CPDFPageFromFPDFPage(pages[index]);
       if (pPage)
         pImgObj->GetImage()->ResetCache(pPage);
     }
   }
 
-  RetainPtr<IFX_SeekableReadStream> pFile = MakeSeekableReadStream(fileAccess);
-  if (inlineJpeg)
+  RetainPtr<IFX_SeekableReadStream> pFile = MakeSeekableReadStream(file_access);
+  if (inline_jpeg)
     pImgObj->GetImage()->SetJpegImageInline(pFile);
   else
     pImgObj->GetImage()->SetJpegImage(pFile);
@@ -105,18 +105,18 @@
 
 FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
 FPDFImageObj_LoadJpegFile(FPDF_PAGE* pages,
-                          int nCount,
+                          int count,
                           FPDF_PAGEOBJECT image_object,
-                          FPDF_FILEACCESS* fileAccess) {
-  return LoadJpegHelper(pages, nCount, image_object, fileAccess, false);
+                          FPDF_FILEACCESS* file_access) {
+  return LoadJpegHelper(pages, count, image_object, file_access, false);
 }
 
 FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
 FPDFImageObj_LoadJpegFileInline(FPDF_PAGE* pages,
-                                int nCount,
+                                int count,
                                 FPDF_PAGEOBJECT image_object,
-                                FPDF_FILEACCESS* fileAccess) {
-  return LoadJpegHelper(pages, nCount, image_object, fileAccess, true);
+                                FPDF_FILEACCESS* file_access) {
+  return LoadJpegHelper(pages, count, image_object, file_access, true);
 }
 
 FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
@@ -157,7 +157,7 @@
 
 FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
 FPDFImageObj_SetBitmap(FPDF_PAGE* pages,
-                       int nCount,
+                       int count,
                        FPDF_PAGEOBJECT image_object,
                        FPDF_BITMAP bitmap) {
   if (!pages)
@@ -170,7 +170,7 @@
   if (!bitmap)
     return false;
 
-  for (int index = 0; index < nCount; index++) {
+  for (int index = 0; index < count; index++) {
     CPDF_Page* pPage = CPDFPageFromFPDFPage(pages[index]);
     if (pPage)
       pImgObj->GetImage()->ResetCache(pPage);
diff --git a/public/fpdf_edit.h b/public/fpdf_edit.h
index 5d654ba..4f38432 100644
--- a/public/fpdf_edit.h
+++ b/public/fpdf_edit.h
@@ -526,44 +526,44 @@
 // Load an image from a JPEG image file and then set it into |image_object|.
 //
 //   pages        - pointer to the start of all loaded pages, may be NULL.
-//   nCount       - number of |pages|, may be 0.
+//   count        - number of |pages|, may be 0.
 //   image_object - handle to an image object.
-//   fileAccess   - file access handler which specifies the JPEG image file.
+//   file_access  - file access handler which specifies the JPEG image file.
 //
 // Returns TRUE on success.
 //
 // The image object might already have an associated image, which is shared and
 // cached by the loaded pages. In that case, we need to clear the cached image
-// for all the loaded pages. Pass |pages| and page count (|nCount|) to this API
+// for all the loaded pages. Pass |pages| and page count (|count|) to this API
 // to clear the image cache. If the image is not previously shared, or NULL is a
 // valid |pages| value.
 FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
 FPDFImageObj_LoadJpegFile(FPDF_PAGE* pages,
-                          int nCount,
+                          int count,
                           FPDF_PAGEOBJECT image_object,
-                          FPDF_FILEACCESS* fileAccess);
+                          FPDF_FILEACCESS* file_access);
 
 // Load an image from a JPEG image file and then set it into |image_object|.
 //
 //   pages        - pointer to the start of all loaded pages, may be NULL.
-//   nCount       - number of |pages|, may be 0.
+//   count        - number of |pages|, may be 0.
 //   image_object - handle to an image object.
-//   fileAccess   - file access handler which specifies the JPEG image file.
+//   file_access  - file access handler which specifies the JPEG image file.
 //
 // Returns TRUE on success.
 //
 // The image object might already have an associated image, which is shared and
 // cached by the loaded pages. In that case, we need to clear the cached image
-// for all the loaded pages. Pass |pages| and page count (|nCount|) to this API
+// for all the loaded pages. Pass |pages| and page count (|count|) to this API
 // to clear the image cache. If the image is not previously shared, or NULL is a
 // valid |pages| value. This function loads the JPEG image inline, so the image
-// content is copied to the file. This allows |fileAccess| and its associated
+// content is copied to the file. This allows |file_access| and its associated
 // data to be deleted after this function returns.
 FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
 FPDFImageObj_LoadJpegFileInline(FPDF_PAGE* pages,
-                                int nCount,
+                                int count,
                                 FPDF_PAGEOBJECT image_object,
-                                FPDF_FILEACCESS* fileAccess);
+                                FPDF_FILEACCESS* file_access);
 
 // Experimental API.
 // Get the transform matrix of an image object.
@@ -618,14 +618,14 @@
 // Set |bitmap| to |image_object|.
 //
 //   pages        - pointer to the start of all loaded pages, may be NULL.
-//   nCount       - number of |pages|, may be 0.
+//   count        - number of |pages|, may be 0.
 //   image_object - handle to an image object.
 //   bitmap       - handle of the bitmap.
 //
 // Returns TRUE on success.
 FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
 FPDFImageObj_SetBitmap(FPDF_PAGE* pages,
-                       int nCount,
+                       int count,
                        FPDF_PAGEOBJECT image_object,
                        FPDF_BITMAP bitmap);