aboutsummaryrefslogtreecommitdiffstats
path: root/src/actions.c
diff options
context:
space:
mode:
authorgramanas <anastasis.gramm2@gmail.com>2018-11-13 15:12:31 +0200
committergramanas <anastasis.gramm2@gmail.com>2018-11-13 15:12:31 +0200
commit5a96d39542d356fc3d102d52390a55d8cb6758d3 (patch)
tree0f9e6844e880759e5b5b20b6af683a0822de410c /src/actions.c
parent2415d22c7a82396daf21dabe6191531cfa21e6a3 (diff)
downloadck-5a96d39542d356fc3d102d52390a55d8cb6758d3.tar.gz
ck-5a96d39542d356fc3d102d52390a55d8cb6758d3.tar.bz2
ck-5a96d39542d356fc3d102d52390a55d8cb6758d3.zip
Leave no string uninitialized.
Diffstat (limited to 'src/actions.c')
-rw-r--r--src/actions.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/actions.c b/src/actions.c
index 5a3befe..965ed5c 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -60,7 +60,7 @@ int run_ADD(UserOpt * opt, Conf *conf) {
goto error;
}
add_make_link(&addOpt, conf);
- char err[STR_M];
+ char err[STR_M] = "";
if (add_err_message(err)) {
PRINT_ERR(err);
error:
@@ -118,8 +118,8 @@ int run_EDIT(UserOpt *opt, Conf *conf) {
}
list_rewind(opt->args);
- char confPath[STR_L];
- char confName[STR_M];
+ char confPath[STR_L] = "";
+ char confName[STR_M] = "";
int secret = 0;
/* Since we are here, args have to be 1 or 2 */
char *pName = list_get(opt->args);
@@ -159,7 +159,7 @@ int run_EDIT(UserOpt *opt, Conf *conf) {
str_join_dirname_with_basename(confPath, secret ? conf->scrt_dir : conf->vc_dir, confName);
char *editor = getenv("EDITOR");
- char command[STR_L];
+ char command[STR_L] = "";
if (str_is_empty(editor)) {
if (system("which nano > /dev/null 2>&1") != 0) {
ERR("Nano not found. Please set $EDITOR to your desired editor.");
@@ -293,7 +293,7 @@ int run_SEARCH(UserOpt *opt, Conf *conf) {
int run_HELP(UserOpt *opt, Conf *conf) {
UNUSED(conf);
- char tmp[STR_M];
+ char tmp[STR_M] = "";
if (strcmp(list_get(opt->args), "config") == 0) {
print_conf_help();
return 0;