diff options
author | Timo Sirainen <cras@irssi.org> | 2003-01-08 20:54:36 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2003-01-08 20:54:36 +0000 |
commit | 842a51c76039bc5c65c6a19999c7fd06edc4d827 (patch) | |
tree | ed08be671d43e1768e7cd2fb24b4bd69726df1a2 /src/core | |
parent | d9af8f0d4ffda1203ef397574b6e1160f1e96788 (diff) | |
download | irssi-842a51c76039bc5c65c6a19999c7fd06edc4d827.zip |
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
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/misc.c | 2 | ||||
-rw-r--r-- | src/core/settings.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/core/misc.c b/src/core/misc.c index 46720d62..4f316786 100644 --- a/src/core/misc.c +++ b/src/core/misc.c @@ -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; } diff --git a/src/core/settings.c b/src/core/settings.c index 099699ca..33355ae2 100644 --- a/src/core/settings.c +++ b/src/core/settings.c @@ -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; |