1
0
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:
Timo Sirainen 2003-01-08 20:54:36 +00:00 committed by cras
parent d9af8f0d4f
commit 842a51c760
2 changed files with 5 additions and 3 deletions

View File

@ -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;
} }

View File

@ -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;