Whitespace/comment cleanup. Use PARAMS in tc-vax.c.
authorKen Raeburn <raeburn@cygnus>
Tue, 28 Sep 1993 04:47:32 +0000 (04:47 +0000)
committerKen Raeburn <raeburn@cygnus>
Tue, 28 Sep 1993 04:47:32 +0000 (04:47 +0000)
Make various routines return null pointer instead of empty string for
success indication.

gas/ChangeLog
gas/config/atof-tahoe.c
gas/config/obj-coffbfd.c
gas/config/tc-a29k.c
gas/config/tc-m88k.c
gas/config/tc-tahoe.c

index 8e0cd9f0ade104aea0b627c32c1cc312c9c425bb..10659f023ad73ab40cf325370a8b6d30e2ffbea2 100644 (file)
@@ -1,3 +1,18 @@
+Mon Sep 27 15:21:55 1993  Ken Raeburn  (raeburn@cambridge.cygnus.com)
+
+       * config/atof-vax.c (md_atof): Return null on success instead of
+       empty string.
+       * config/atof-tahoe.c (md_atof): Ditto.
+       * read.c (float_cons): Expect a null pointer for success, not an
+       empty string.
+
+       * hash.c (hash_insert, hash_jam, hash_grow): Return null pointer
+       on success, instead of empty string.  All callers changed.
+
+       * config/tc-vax.c: Use PARAMS in declarations.
+       (vip_op): Use NULL instead of empty string for success in error
+       and warning fields.
+
 Sun Sep 26 23:45:29 1993  Ken Raeburn  (raeburn@cambridge.cygnus.com)
 
        * expr.c (expr) [DIFF_EXPR_OK]: Permit subtraction of two symbols
index a80c89ebfa03fa33e05128d9a8e4b6fee3d43d8c..195ea2f9171e86ccd943e4e6f8d5a22caeb1bd85 100644 (file)
@@ -365,7 +365,7 @@ flonum_gen2tahoe (format_letter, f, words)
  *     Address of where to return size of literal (in chars).
  *
  * Out:        Input_line_pointer -> of next char after floating number.
- *     Error message, or "".
+ *     Error message, or 0.
  *     Floating point literal.
  *     Number of chars we used for the literal.
  */
@@ -425,7 +425,7 @@ md_atof (what_statement_type, literalP, sizeP)
     };
 
   *sizeP = number_of_chars;
-  return (kind_of_float ? "" : "Bad call to md_atof()");
-}                              /* md_atof() */
+  return kind_of_float ? 0 : "Bad call to md_atof()";
+}
 
 /* atof_tahoe.c */
index ce1e94c7dbfee4df995ebd740682907551a1907b..dd5e1e730fbe035e33bf55e9f3defd2d36726d7e 100644 (file)
@@ -1319,7 +1319,7 @@ tag_insert (name, symbolP)
 {
   register const char *error_string;
 
-  if (*(error_string = hash_jam (tag_hash, name, (char *) symbolP)))
+  if ((error_string = hash_jam (tag_hash, name, (char *) symbolP)))
     {
       as_fatal ("Inserting \"%s\" into structure table failed: %s",
                name, error_string);
index 1f4957f7a0ed24b5e71b586e0cf5bbab4f43c71d..72b61f78b82a84f1df98ff1bea4eee4d5140b347 100644 (file)
@@ -332,7 +332,7 @@ md_begin ()
        }
 
       retval = hash_insert (op_hash, name, (PTR) &machine_opcodes[i]);
-      if (retval != NULL && *retval != '\0')
+      if (retval != NULL)
        {
          fprintf (stderr, "internal error: can't hash `%s': %s\n",
                   machine_opcodes[i].name, retval);
index 245fc209c33b8fb16287a7793c4d16f124a04ccb..961c418ff42797fd7921c9642442baaea37a8e7b 100644 (file)
@@ -201,7 +201,7 @@ md_begin ()
 
       retval = hash_insert (op_hash, name, &m88k_opcodes[i]);
 
-      if (retval != NULL && *retval != '\0')
+      if (retval != NULL)
        as_fatal ("Can't hash instruction '%s':%s",
                  m88k_opcodes[i].name, retval);
 
index 5fc47d3f54e2af7270e3b46258b1a71f25278066..ed5fb61984ee649106c0b4ca5817884a130288cd 100644 (file)
@@ -346,16 +346,16 @@ const relax_typeS
 #undef WB
 /* End relax stuff */
 \f
-static struct hash_control *op_hash = NULL;    /* handle of the OPCODE hash table
-                                                  NULL means any use before md_begin() will
-                                                  crash */
+/* Handle of the OPCODE hash table.  NULL means any use before
+   md_begin() will crash.  */
+static struct hash_control *op_hash;
 
 /* Init function. Build the hash table. */
 void
 md_begin ()
 {
   struct tot *tP;
-  char *errorval = "";
+  char *errorval = 0;
   int synthetic_too = 1;       /* If 0, just use real opcodes. */
 
   if ((op_hash = hash_new ()))
@@ -376,9 +376,9 @@ md_begin ()
     {
       errorval = "Virtual memory exceeded";
     }
-  if (*errorval)
+  if (errorval)
     as_fatal (errorval);
-}                              /* md_begin */
+}
 
 void
 md_end ()
This page took 0.045902 seconds and 4 git commands to generate.