Error when gdb_is_target_1 is called without running gdb instance
[binutils-gdb.git] / gdb / target-float.c
index e287ace27aabe26c9483d70614f352c1cd9ffac1..d077ca2e8e888fd1554ddbbaf01dfdc54c3d76fc 100644 (file)
@@ -1,6 +1,6 @@
 /* Floating point routines for GDB, the GNU debugger.
 
-   Copyright (C) 2017-2021 Free Software Foundation, Inc.
+   Copyright (C) 2017-2022 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -1191,7 +1191,7 @@ public:
               const gdb_byte *y, const struct type *type_y) const override;
 
 private:
-  /* Local wrapper class to handle mpfr_t initalization and cleanup.  */
+  /* Local wrapper class to handle mpfr_t initialization and cleanup.  */
   class gdb_mpfr
   {
   public:
@@ -2234,7 +2234,7 @@ get_target_float_ops_kind (const struct type *type)
     }
 }
 
-/* Return target_float_ops to peform operations for KIND.  */
+/* Return target_float_ops to perform operations for KIND.  */
 static const target_float_ops *
 get_target_float_ops (enum target_float_ops_kind kind)
 {
@@ -2451,11 +2451,11 @@ target_float_convert (const gdb_byte *from, const struct type *from_type,
 
   /* Convert between two different formats in the same category.  */
   if (!target_float_same_format_p (from_type, to_type))
-  {
-    const target_float_ops *ops = get_target_float_ops (from_type, to_type);
-    ops->convert (from, from_type, to, to_type);
-    return;
-  }
+    {
+      const target_float_ops *ops = get_target_float_ops (from_type, to_type);
+      ops->convert (from, from_type, to, to_type);
+      return;
+    }
 
   /* The floating-point formats match, so we simply copy the data, ensuring
      possible padding bytes in the target buffer are zeroed out.  */