mirror of
https://github.com/irssi/irssi.git
synced 2026-08-08 19:30:15 +02:00
Fix warning.
Add comment on the use of ??) in C, since that string isn't entirely obvious to people who are reading the code.
This commit is contained in:
parent
be977bf1b7
commit
519955ebe4
1 changed files with 7 additions and 3 deletions
|
|
@ -347,10 +347,14 @@ static void item_lag(SBAR_ITEM_REC *item, int get_size_only)
|
|||
last_lag_unknown = lag_unknown;
|
||||
|
||||
if (lag_unknown) {
|
||||
g_snprintf(str, sizeof(str), "%d (?""?)", lag/100);
|
||||
// "??)" in C becomes ']'
|
||||
// See: https://en.wikipedia.org/wiki/Digraphs_and_trigraphs#C
|
||||
g_snprintf(str, sizeof(str), "%d (?""?)", lag / 100);
|
||||
} else {
|
||||
g_snprintf(str, sizeof(str),
|
||||
lag%100 == 0 ? "%d" : "%d.%02d", lag/100, lag%100);
|
||||
if (lag % 100 == 0)
|
||||
g_snprintf(str, sizeof(str), "%d", lag / 100);
|
||||
else
|
||||
g_snprintf(str, sizeof(str), "%d.%02d", lag / 100, lag % 100);
|
||||
}
|
||||
|
||||
statusbar_item_default_handler(item, get_size_only,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue