commit 22739601a1418806d9993d39685a6d4bab32214a
parent 8587ab18cfa263b1aac67dbf205040dd71f6a464
Author: Remy Noulin <loader2x@gmail.com>
Date: Wed, 19 Jul 2017 21:24:15 +0200
fix compilation error
c/git-off.c | 5 +++--
c/gitoff.c | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
Diffstat:
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/c/git-off.c b/c/git-off.c
@@ -1976,6 +1976,7 @@ void offCommands_clean() {
char b[1024];
FILE *f = NULL;
int sR;
+ char *quotedFile = NULL;
// replace files handled by git off with reference
// stdin is data from the working directory file
@@ -1995,8 +1996,8 @@ void offCommands_clean() {
struct stat st;
stat(file, &st);
size = st.st_size;
- char *quotedFile = malloc(strlen(file) + 1 + 4);
- sprintf(char *quotedFile, "\"%s\"", file);
+ quotedFile = malloc(strlen(file) + 1 + 4);
+ sprintf(quotedFile, "\"%s\"", file);
offFile = exec(sha, quotedFile);
free(quotedFile);
offFilePath = offHelpers_getOffFilePath(offFile);
diff --git a/c/gitoff.c b/c/gitoff.c
@@ -1975,6 +1975,7 @@ void offCommands_clean() {
char b[1024];
FILE *f = NULL;
int sR;
+ char *quotedFile = NULL;
// replace files handled by git off with reference
// stdin is data from the working directory file
@@ -1994,8 +1995,8 @@ void offCommands_clean() {
struct stat st;
stat(file, &st);
size = st.st_size;
- char *quotedFile = malloc(strlen(file) + 1 + 4);
- sprintf(char *quotedFile, "\"%s\"", file);
+ quotedFile = malloc(strlen(file) + 1 + 4);
+ sprintf(quotedFile, "\"%s\"", file);
offFile = exec(sha, quotedFile);
free(quotedFile);
offFilePath = offHelpers_getOffFilePath(offFile);