aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@cygnus>1993-09-28 04:47:32 +0000
committerKen Raeburn <raeburn@cygnus>1993-09-28 04:47:32 +0000
commit43029a8f84e0684ba2c1e6e1643245cd80404ef2 (patch)
tree98419426285e4dd74f8673764c4d7881375cef62 /gas
parent32940b9fe3088fefe40ca9009f622ef5bb22b4bf (diff)
downloadfsf-binutils-gdb-43029a8f84e0684ba2c1e6e1643245cd80404ef2.zip
fsf-binutils-gdb-43029a8f84e0684ba2c1e6e1643245cd80404ef2.tar.gz
fsf-binutils-gdb-43029a8f84e0684ba2c1e6e1643245cd80404ef2.tar.bz2
Whitespace/comment cleanup. Use PARAMS in tc-vax.c.
Make various routines return null pointer instead of empty string for success indication.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog15
-rw-r--r--gas/config/atof-tahoe.c6
-rw-r--r--gas/config/obj-coffbfd.c2
-rw-r--r--gas/config/tc-a29k.c2
-rw-r--r--gas/config/tc-m88k.c2
-rw-r--r--gas/config/tc-tahoe.c12
6 files changed, 27 insertions, 12 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 8e0cd9f..10659f0 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -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
diff --git a/gas/config/atof-tahoe.c b/gas/config/atof-tahoe.c
index a80c89e..195ea2f 100644
--- a/gas/config/atof-tahoe.c
+++ b/gas/config/atof-tahoe.c
@@ -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 */
diff --git a/gas/config/obj-coffbfd.c b/gas/config/obj-coffbfd.c
index ce1e94c..dd5e1e7 100644
--- a/gas/config/obj-coffbfd.c
+++ b/gas/config/obj-coffbfd.c
@@ -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);
diff --git a/gas/config/tc-a29k.c b/gas/config/tc-a29k.c
index 1f4957f..72b61f7 100644
--- a/gas/config/tc-a29k.c
+++ b/gas/config/tc-a29k.c
@@ -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);
diff --git a/gas/config/tc-m88k.c b/gas/config/tc-m88k.c
index 245fc20..961c418 100644
--- a/gas/config/tc-m88k.c
+++ b/gas/config/tc-m88k.c
@@ -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);
diff --git a/gas/config/tc-tahoe.c b/gas/config/tc-tahoe.c
index 5fc47d3..ed5fb61 100644
--- a/gas/config/tc-tahoe.c
+++ b/gas/config/tc-tahoe.c
@@ -346,16 +346,16 @@ const relax_typeS
#undef WB
/* End relax stuff */
-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 ()