summaryrefslogtreecommitdiffstats
path: root/src/phcfg.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2012-12-08 17:58:27 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2012-12-08 17:58:27 +0100
commit190b91b85e64505fecda5bbc920c9f95fe02d964 (patch)
tree9e26392de7b948956d50d67a37ae2c96464d23cc /src/phcfg.c
parent80385c0ed135bc24b9241e31b432afee63bc4e09 (diff)
various code cleanup
Diffstat (limited to 'src/phcfg.c')
-rw-r--r--src/phcfg.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/phcfg.c b/src/phcfg.c
index 06297ac..cb4c5f8 100644
--- a/src/phcfg.c
+++ b/src/phcfg.c
@@ -107,8 +107,7 @@ static FILE *file_options_save_aux(void)
}
if(filename!=NULL)
{
- FILE*handle=NULL;
- handle=fopen(filename,"wb");
+ FILE *handle=fopen(filename,"wb");
if(handle)
{
log_info("Create file %s\n", filename);
@@ -121,8 +120,7 @@ static FILE *file_options_save_aux(void)
}
#endif
{
- FILE*handle=NULL;
- handle=fopen(PHOTOREC_CFG,"wb");
+ FILE *handle=fopen(PHOTOREC_CFG,"wb");
if(handle)
{
log_info("Create file %s\n", PHOTOREC_CFG);
@@ -178,8 +176,7 @@ static FILE *file_options_load_aux(void)
if (home != NULL)
{
FILE*handle;
- char *filename=NULL;
- filename=(char*)MALLOC(strlen(home)+strlen(DOT_PHOTOREC_CFG)+1);
+ char *filename=(char*)MALLOC(strlen(home)+strlen(DOT_PHOTOREC_CFG)+1);
strcpy(filename, home);
strcat(filename, DOT_PHOTOREC_CFG);
handle=fopen(filename,"rb");
@@ -194,8 +191,7 @@ static FILE *file_options_load_aux(void)
}
#endif
{
- FILE*handle=NULL;
- handle=fopen(PHOTOREC_CFG,"rb");
+ FILE *handle=fopen(PHOTOREC_CFG,"rb");
if(handle!=NULL)
{
log_info("Load parameters from %s\n", PHOTOREC_CFG);