mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05: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
@ -847,7 +847,7 @@ int parse_time_interval(const char *time, int *msecs)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
*msecs += number; /* assume seconds */
|
*msecs += number * 1000; /* assume seconds */
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,14 +67,16 @@ static SETTINGS_REC *settings_get(const char *key, SettingType type)
|
|||||||
{
|
{
|
||||||
SETTINGS_REC *rec;
|
SETTINGS_REC *rec;
|
||||||
|
|
||||||
|
g_return_val_if_fail(key != NULL, NULL);
|
||||||
|
|
||||||
rec = settings_find(key);
|
rec = settings_find(key);
|
||||||
if (rec == NULL) {
|
if (rec == NULL) {
|
||||||
g_warning("settings_get(%s) : not found", key);
|
g_warning("settings_get(%s) : not found", key);
|
||||||
return 0;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (type != -1 && rec->type != type) {
|
if (type != -1 && rec->type != type) {
|
||||||
g_warning("settings_get(%s) : invalid type", key);
|
g_warning("settings_get(%s) : invalid type", key);
|
||||||
return 0;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return rec;
|
return rec;
|
||||||
|
Loading…
Reference in New Issue
Block a user