summaryrefslogtreecommitdiff
path: root/src/dd.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1992-10-31 23:01:35 +0000
committerJim Meyering <jim@meyering.net>1992-10-31 23:01:35 +0000
commit220a183e8df47d3fdd312413c990e984c9f390d2 (patch)
tree794bc3e2394781e830ffd0a560f7c70aee654da2 /src/dd.c
parent37ff29b8201d00bb9209e387a427751c2dc5ee2c (diff)
downloadcoreutils-220a183e8df47d3fdd312413c990e984c9f390d2.tar.xz
(swab_buffer): Fix typo that incremented pointer instead of counter.
Add braces around static struct initializers.
Diffstat (limited to 'src/dd.c')
-rw-r--r--src/dd.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/dd.c b/src/dd.c
index dd5606815..222d077e0 100644
--- a/src/dd.c
+++ b/src/dd.c
@@ -177,18 +177,18 @@ struct conversion
struct conversion conversions[] =
{
- "ascii", C_ASCII | C_TWOBUFS, /* EBCDIC to ASCII. */
- "ebcdic", C_EBCDIC | C_TWOBUFS, /* ASCII to EBCDIC. */
- "ibm", C_IBM | C_TWOBUFS, /* Slightly different ASCII to EBCDIC. */
- "block", C_BLOCK | C_TWOBUFS, /* Variable to fixed length records. */
- "unblock", C_UNBLOCK | C_TWOBUFS, /* Fixed to variable length records. */
- "lcase", C_LCASE | C_TWOBUFS, /* Translate upper to lower case. */
- "ucase", C_UCASE | C_TWOBUFS, /* Translate lower to upper case. */
- "swab", C_SWAB | C_TWOBUFS, /* Swap bytes of input. */
- "noerror", C_NOERROR, /* Ignore i/o errors. */
- "notrunc", C_NOTRUNC, /* Do not truncate output file. */
- "sync", C_SYNC, /* Pad input records to ibs with NULs. */
- NULL, 0
+ {"ascii", C_ASCII | C_TWOBUFS}, /* EBCDIC to ASCII. */
+ {"ebcdic", C_EBCDIC | C_TWOBUFS}, /* ASCII to EBCDIC. */
+ {"ibm", C_IBM | C_TWOBUFS}, /* Slightly different ASCII to EBCDIC. */
+ {"block", C_BLOCK | C_TWOBUFS}, /* Variable to fixed length records. */
+ {"unblock", C_UNBLOCK | C_TWOBUFS}, /* Fixed to variable length records. */
+ {"lcase", C_LCASE | C_TWOBUFS}, /* Translate upper to lower case. */
+ {"ucase", C_UCASE | C_TWOBUFS}, /* Translate lower to upper case. */
+ {"swab", C_SWAB | C_TWOBUFS}, /* Swap bytes of input. */
+ {"noerror", C_NOERROR}, /* Ignore i/o errors. */
+ {"notrunc", C_NOTRUNC}, /* Do not truncate output file. */
+ {"sync", C_SYNC}, /* Pad input records to ibs with NULs. */
+ {NULL, 0}
};
/* Translation table formed by applying successive transformations. */
@@ -455,7 +455,7 @@ swab_buffer (buf, nread)
if (char_is_saved)
{
*--bufstart = saved_char;
- *nread++;
+ (*nread)++;
char_is_saved = 0;
}