mirror of
https://github.com/irssi/irssi.git
synced 2026-08-17 23:52:22 +02:00
parse_time_interval() fallbacked to milliseconds, not seconds. some code
cleanups. patch by Peder git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3094 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
d9af8f0d4f
commit
842a51c760
2 changed files with 5 additions and 3 deletions
|
|
@ -847,7 +847,7 @@ int parse_time_interval(const char *time, int *msecs)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
*msecs += number; /* assume seconds */
|
||||
*msecs += number * 1000; /* assume seconds */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -67,14 +67,16 @@ static SETTINGS_REC *settings_get(const char *key, SettingType type)
|
|||
{
|
||||
SETTINGS_REC *rec;
|
||||
|
||||
g_return_val_if_fail(key != NULL, NULL);
|
||||
|
||||
rec = settings_find(key);
|
||||
if (rec == NULL) {
|
||||
g_warning("settings_get(%s) : not found", key);
|
||||
return 0;
|
||||
return NULL;
|
||||
}
|
||||
if (type != -1 && rec->type != type) {
|
||||
g_warning("settings_get(%s) : invalid type", key);
|
||||
return 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return rec;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue