FreeCalypso > hg > freecalypso-tools
comparison uptools/sms-pdu-decode/pdu-common.c @ 963:b515a97e5dff
sms-pdu-decode family: fix VP-Relative header spacing
When VP-Relative is small enough to be reckoned in 5 min or 30 min units,
it was printed incorrectly, with a cosmetic defect of one extra space.
Fix this bug.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 28 Aug 2023 03:52:53 +0000 |
parents | 411d1cc14326 |
children |
comparison
equal
deleted
inserted
replaced
962:e3706ce1d01c | 963:b515a97e5dff |
---|---|
199 return(0); | 199 return(0); |
200 } | 200 } |
201 | 201 |
202 hhmm: hours = min / 60; | 202 hhmm: hours = min / 60; |
203 min %= 60; | 203 min %= 60; |
204 printf("VP-Relative: "); | 204 printf("VP-Relative:"); |
205 if (hours) | 205 if (hours) |
206 printf(" %u hour%s", hours, hours != 1 ? "s" : ""); | 206 printf(" %u hour%s", hours, hours != 1 ? "s" : ""); |
207 if (min) | 207 if (min) |
208 printf(" %u min", min); | 208 printf(" %u min", min); |
209 putchar('\n'); | 209 putchar('\n'); |