clang-tidy: readability-else-after-return
[geeqie.git] / src / lua.cc
index b03b048..5279a2a 100644 (file)
@@ -259,13 +259,12 @@ static int lua_exif_get_datum(lua_State *L)
                        lua_pushnumber(L, datetime);
                        return 1;
                        }
-               else
-                       {
-                       lua_pushnil(L);
-                       return 1;
-                       }
+
+               lua_pushnil(L);
+               return 1;
                }
-       else if (strcmp(key, "Exif.Photo.DateTimeDigitized") == 0)
+
+       if (strcmp(key, "Exif.Photo.DateTimeDigitized") == 0)
                {
                memset(&tm, 0, sizeof(tm));
                if (value && strptime(value, "%Y:%m:%d %H:%M:%S", &tm))
@@ -274,11 +273,9 @@ static int lua_exif_get_datum(lua_State *L)
                        lua_pushnumber(L, datetime);
                        return 1;
                        }
-               else
-                       {
-                       lua_pushnil(L);
-                       return 1;
-                       }
+
+               lua_pushnil(L);
+               return 1;
                }
        lua_pushstring(L, value);
        return 1;