20000-05-18 H.J. Lu (hjl@gnu.org)
[binutils-gdb.git] / gdb / language.c
index ebdcefe5628581eb23a68ff8b734d3babda5aa43..20d2adb66c022543e4e8174dd48e9dee5a62be91 100644 (file)
@@ -394,7 +394,8 @@ set_lang_str ()
 {
   char *prefix = "";
 
-  free (language);
+  if (language)
+    free (language);
   if (language_mode == language_mode_auto)
     prefix = "auto; currently ";
 
@@ -406,7 +407,8 @@ set_type_str ()
 {
   char *tmp = NULL, *prefix = "";
 
-  free (type);
+  if (type)
+    free (type);
   if (type_mode == type_mode_auto)
     prefix = "auto; currently ";
 
@@ -451,7 +453,8 @@ set_range_str ()
       error ("Unrecognized range check setting.");
     }
 
-  free (range);
+  if (range)
+    free (range);
   range = concat (pref, tmp, NULL);
 }
 
@@ -545,6 +548,11 @@ local_hex_format_custom (pre)
   return form;
 }
 
+#if 0
+/* FIXME: cagney/2000-03-04: This function does not appear to be used.
+   It can be deleted once 5.0 has been released. */
+/* FIXME: cagney/2000-03-04: This code assumes that the compiler
+   supports ``long long''. */
 /* Converts a number to hexadecimal (without leading "0x") and stores it in a
    static string.  Returns a pointer to this string. */
 
@@ -562,6 +570,7 @@ longest_raw_hex_string (num)
   sprintf (res_longest_raw_hex_string, "%llx", ll);
   return res_longest_raw_hex_string;
 }
+#endif
 
 /* Converts a number to hexadecimal and stores it in a static
    string.  Returns a pointer to this string. */
@@ -624,9 +633,7 @@ longest_local_hex_string_custom (num, width)
      can use local_hex_string_custom 
    */
   return local_hex_string_custom ((unsigned long) num, width);
-#endif
-
-#if defined (PRINTF_HAS_LONG_LONG)
+#elif defined (PRINTF_HAS_LONG_LONG)
   /* Just use printf.  */
   strcpy (format, local_hex_format_prefix ()); /* 0x */
   strcat (format, "%");