mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
Merge pull request #94 from dajohi/uninitialized
Avoid using uninitalized values.
This commit is contained in:
commit
d023d7d839
@ -163,7 +163,7 @@ static int module_load_name(const char *path, const char *rootmodule,
|
|||||||
GModule *gmodule;
|
GModule *gmodule;
|
||||||
MODULE_REC *module;
|
MODULE_REC *module;
|
||||||
MODULE_FILE_REC *rec;
|
MODULE_FILE_REC *rec;
|
||||||
gpointer value1, value2;
|
gpointer value1, value2 = NULL;
|
||||||
char *initfunc, *deinitfunc;
|
char *initfunc, *deinitfunc;
|
||||||
int found;
|
int found;
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ int settings_get_bool(const char *key)
|
|||||||
int settings_get_time(const char *key)
|
int settings_get_time(const char *key)
|
||||||
{
|
{
|
||||||
const char *str;
|
const char *str;
|
||||||
int msecs;
|
int msecs = 0;
|
||||||
|
|
||||||
str = settings_get_str_type(key, SETTING_TYPE_TIME);
|
str = settings_get_str_type(key, SETTING_TYPE_TIME);
|
||||||
if (str != NULL && !parse_time_interval(str, &msecs))
|
if (str != NULL && !parse_time_interval(str, &msecs))
|
||||||
@ -140,7 +140,7 @@ int settings_get_level(const char *key)
|
|||||||
int settings_get_size(const char *key)
|
int settings_get_size(const char *key)
|
||||||
{
|
{
|
||||||
const char *str;
|
const char *str;
|
||||||
int bytes;
|
int bytes = 0;
|
||||||
|
|
||||||
str = settings_get_str_type(key, SETTING_TYPE_SIZE);
|
str = settings_get_str_type(key, SETTING_TYPE_SIZE);
|
||||||
if (str != NULL && !parse_size(str, &bytes))
|
if (str != NULL && !parse_size(str, &bytes))
|
||||||
|
@ -82,7 +82,7 @@ char *expand_emphasis(WI_ITEM_REC *item, const char *text)
|
|||||||
continue;
|
continue;
|
||||||
if (!ishighalnum(end[-1]) || ishighalnum(end[1]) ||
|
if (!ishighalnum(end[-1]) || ishighalnum(end[1]) ||
|
||||||
end[1] == type || end[1] == '*' || end[1] == '_' ||
|
end[1] == type || end[1] == '*' || end[1] == '_' ||
|
||||||
(type == 29 && end[1] != NULL && ishighalnum(end[2])))
|
(type == 29 && end[1] != '\0' && ishighalnum(end[2])))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (IS_CHANNEL(item)) {
|
if (IS_CHANNEL(item)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user