From: Ralph Corderoy Date: Sun, 23 Apr 2017 14:48:53 +0000 (+0100) Subject: Use C's `++', `+=', etc., not the longhand. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/2c5c74d8aff556e5cd7bc10c9d555a0b2a026ed7?hp=d4935c564e1497843ac995957fdb044a2a8891c5 Use C's `++', `+=', etc., not the longhand. --- diff --git a/sbr/dtime.c b/sbr/dtime.c index 53c56578..58cb94eb 100644 --- a/sbr/dtime.c +++ b/sbr/dtime.c @@ -300,7 +300,7 @@ dtimezone (int offset, int flags) #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)); diff --git a/sbr/encode_rfc2047.c b/sbr/encode_rfc2047.c index bc5fc1be..238882dc 100644 --- a/sbr/encode_rfc2047.c +++ b/sbr/encode_rfc2047.c @@ -736,7 +736,7 @@ do_reformat: if (groupflag && ! mn->m_ingrp) { output = add(";", output); - column += 1; + column++; } groupflag = mn->m_ingrp; diff --git a/sbr/fmt_scan.c b/sbr/fmt_scan.c index ef3ab1b1..de1e0806 100644 --- a/sbr/fmt_scan.c +++ b/sbr/fmt_scan.c @@ -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) - value = value / fmt->f_value; + value /= 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; diff --git a/sbr/mts.c b/sbr/mts.c index 76a43793..c7378c71 100644 --- 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++) - i = i * r + ((unsigned char) *s) - '0'; + i *= r + ((unsigned char) *s) - '0'; s--; *bp = toascii (i); break; diff --git a/uip/mhbuildsbr.c b/uip/mhbuildsbr.c index 73085ca2..51185eee 100644 --- a/uip/mhbuildsbr.c +++ b/uip/mhbuildsbr.c @@ -1212,7 +1212,7 @@ compose_content (CT ct, int verbose) 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; diff --git a/uip/mhshowsbr.c b/uip/mhshowsbr.c index 8eb3402a..a90a3ae8 100644 --- a/uip/mhshowsbr.c +++ b/uip/mhshowsbr.c @@ -990,8 +990,8 @@ parse_display_string (CT ct, char *cp, int *xstdin, int *xlist, 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. */