From 77927e750017e4aa54bbc8561e6b73df890faf8a Mon Sep 17 00:00:00 2001
From: Uwe Schulzweida <uwe.schulzweida@mpimet.mpg.de>
Date: Fri, 6 Aug 2021 13:54:17 +0200
Subject: [PATCH] getInt2IntMap: Fix typo.

---
 src/stream_grb.c     | 6 +++---
 src/stream_gribapi.c | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/stream_grb.c b/src/stream_grb.c
index 49a0d1104..79652878d 100644
--- a/src/stream_grb.c
+++ b/src/stream_grb.c
@@ -191,10 +191,10 @@ static const int grib2ltypeMap[][2] =
 static const size_t grib2ltypeMapSize = sizeof(grib2ltypeMap) / (2 * sizeof(int));
 
 static int
-getInt2IntMap(int searchKey, bool keyValue, size_t tableSize, const int grib1ltypeMap2[][2], int defaultValue)
+getInt2IntMap(int searchKey, bool keyValue, size_t mapSize, const int gribltypeMap[][2], int defaultValue)
 {
-  for (size_t i = 0; i < tableSize; ++i)
-    if (grib1ltypeMap[i][keyValue] == searchKey) return grib1ltypeMap2[i][!keyValue];
+  for (size_t i = 0; i < mapSize; ++i)
+    if (gribltypeMap[i][keyValue] == searchKey) return gribltypeMap[i][!keyValue];
 
   return defaultValue;
 }
diff --git a/src/stream_gribapi.c b/src/stream_gribapi.c
index aea2c1607..7f66b90b0 100644
--- a/src/stream_gribapi.c
+++ b/src/stream_gribapi.c
@@ -2380,7 +2380,7 @@ void gribapiDefLevel(int editionNumber, grib_handle *gh, int zaxisID, int levelI
       {
         if (zaxistype == ZAXIS_HEIGHT)
           {
-            double sf = zaxis_units_to_meter(zaxisID);
+            const double sf = zaxis_units_to_meter(zaxisID);
             level   *= sf;
             dlevel1 *= sf;
             dlevel2 *= sf;
-- 
GitLab