summaryrefslogtreecommitdiffstats
path: root/get_path.c
diff options
context:
space:
mode:
Diffstat (limited to 'get_path.c')
-rw-r--r--get_path.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/get_path.c b/get_path.c
index 679b0632ed..f40580f1f9 100644
--- a/get_path.c
+++ b/get_path.c
@@ -53,12 +53,12 @@ char *get_path(const char *filename){
#endif
len = strlen(homedir) + strlen(config_dir) + 1;
if (filename == NULL) {
- if ((buff = (char *) malloc(len)) == NULL)
+ if ((buff = malloc(len)) == NULL)
return NULL;
sprintf(buff, "%s%s", homedir, config_dir);
} else {
len += strlen(filename) + 1;
- if ((buff = (char *) malloc(len)) == NULL)
+ if ((buff = malloc(len)) == NULL)
return NULL;
sprintf(buff, "%s%s/%s", homedir, config_dir, filename);
}
@@ -95,7 +95,7 @@ char *get_path(const char *filename){
maxlen=strlen(filename)+strlen(res_url_path)+2;
}
free(buff);
- buff = (char *) malloc(maxlen);
+ buff = malloc(maxlen);
strcpy(buff, res_url_path);
strcat(buff,"/");