]> diplodocus.org Git - nmh/commitdiff
Use C's `++', `+=', etc., not the longhand.
authorRalph Corderoy <ralph@inputplus.co.uk>
Sun, 23 Apr 2017 14:48:53 +0000 (15:48 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Sun, 23 Apr 2017 14:58:22 +0000 (15:58 +0100)
sbr/dtime.c
sbr/encode_rfc2047.c
sbr/fmt_scan.c
sbr/mts.c
uip/mhbuildsbr.c
uip/mhshowsbr.c

index 53c565786a97cbbc6d812a62e4fef4058f6c7515..58cb94eb8c5f181c328c8cc290e8cc33ec27159a 100644 (file)
@@ -300,7 +300,7 @@ dtimezone (int offset, int flags)
 
 #ifdef ADJUST_NUMERIC_ONLY_TZ_OFFSETS_WRT_DST
     if (flags & TW_DST)
 
 #ifdef ADJUST_NUMERIC_ONLY_TZ_OFFSETS_WRT_DST
     if (flags & TW_DST)
-       hours += 1;
+       hours++;
 #endif /* ADJUST_NUMERIC_ONLY_TZ_OFFSETS_WRT_DST */
     snprintf (buffer, sizeof(buffer), "%s%02d%02d",
                offset < 0 ? "-" : "+", abs (hours), abs (mins));
 #endif /* ADJUST_NUMERIC_ONLY_TZ_OFFSETS_WRT_DST */
     snprintf (buffer, sizeof(buffer), "%s%02d%02d",
                offset < 0 ? "-" : "+", abs (hours), abs (mins));
index bc5fc1becc3ed00257e286ac025358e9e1994cfa..238882dc2cbd6998c1499260593a819632cb6239 100644 (file)
@@ -736,7 +736,7 @@ do_reformat:
 
        if (groupflag && ! mn->m_ingrp) {
            output = add(";", output);
 
        if (groupflag && ! mn->m_ingrp) {
            output = add(";", output);
-           column += 1;
+           column++;
        }
 
        groupflag = mn->m_ingrp;
        }
 
        groupflag = mn->m_ingrp;
index ef3ab1b1b8b975cff1c6bbfeab1bd11631659940..de1e080600b01e405660b488c4ec72df1aeab3f5 100644 (file)
@@ -749,13 +749,13 @@ fmt_scan (struct format *format, charstring_t scanlp, int width, int *dat,
            break;
        case FT_LV_DIVIDE_L:
            if (fmt->f_value)
            break;
        case FT_LV_DIVIDE_L:
            if (fmt->f_value)
-               value = value / fmt->f_value;
+               value /= fmt->f_value;
            else
                value = 0;
            break;
        case FT_LV_MODULO_L:
            if (fmt->f_value)
            else
                value = 0;
            break;
        case FT_LV_MODULO_L:
            if (fmt->f_value)
-               value = value % fmt->f_value;
+               value %= fmt->f_value;
            else
                value = 0;
            break;
            else
                value = 0;
            break;
index 76a437935d65bb1f3044994489eb010bb5592de1..c7378c7188b2dbc9f310cb546c2f0a1153cf2d2c 100644 (file)
--- a/sbr/mts.c
+++ b/sbr/mts.c
@@ -192,7 +192,7 @@ tailor_value (char *s)
                    }
                    r = ((unsigned char) *s) != '0' ? 10 : 8;
                    for (i = 0; isdigit ((unsigned char) *s); s++)
                    }
                    r = ((unsigned char) *s) != '0' ? 10 : 8;
                    for (i = 0; isdigit ((unsigned char) *s); s++)
-                       i = i * r + ((unsigned char) *s) - '0';
+                       i *= r + ((unsigned char) *s) - '0';
                    s--;
                    *bp = toascii (i);
                    break;
                    s--;
                    *bp = toascii (i);
                    break;
index 73085ca2b8c160955b56d5380a8714355c0afcd1..51185eeebaf400b9fec3af5cddc44b41fd7f2180 100644 (file)
@@ -1212,7 +1212,7 @@ compose_content (CT ct, int verbose)
        if (listsw) {
            ct->c_end = (partnum = strlen (prefix) + 2) + 2;
            if (ct->c_rfc934)
        if (listsw) {
            ct->c_end = (partnum = strlen (prefix) + 2) + 2;
            if (ct->c_rfc934)
-               ct->c_end += 1;
+               ct->c_end++;
 
            for (part = m->mp_parts; part; part = part->mp_next)
                ct->c_end += part->mp_part->c_end + partnum;
 
            for (part = m->mp_parts; part; part = part->mp_next)
                ct->c_end += part->mp_part->c_end + partnum;
index 8eb3402adae31d6c837fc456910c2cd73074f393..a90a3ae8d7938db588c11f8c8887528fe8078565 100644 (file)
@@ -990,8 +990,8 @@ parse_display_string (CT ct, char *cp, int *xstdin, int *xlist,
                           quote. */
                        memmove (pp, pp-1, len+1);
                        *(pp++-1) = '\\';
                           quote. */
                        memmove (pp, pp-1, len+1);
                        *(pp++-1) = '\\';
-                       buflen -= 1;
-                       bp += 1;
+                       buflen--;
+                       bp++;
                    }
                }
                /* If pp is still set, that means we ran out of space. */
                    }
                }
                /* If pp is still set, that means we ran out of space. */