mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05: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
@ -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…
Reference in New Issue
Block a user