summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src')
-rw-r--r--libglusterfs/src/spec.y6
1 files changed, 4 insertions, 2 deletions
diff --git a/libglusterfs/src/spec.y b/libglusterfs/src/spec.y
index 4de77a431..f0a0caea1 100644
--- a/libglusterfs/src/spec.y
+++ b/libglusterfs/src/spec.y
@@ -470,8 +470,9 @@ parse_backtick (FILE *srcfp, FILE *dstfp)
int ret = 0, i = 0;
char *cmd = NULL, *result = NULL;
size_t cmd_buf_size = GF_CMD_BUFFER_LEN;
- char escaped = 0, in_backtick = 0, character = 0;
+ char escaped = 0, in_backtick = 0;
int line = 1, column = 0, backtick_line = 0, backtick_column = 0;
+ int character = 0;
fseek (srcfp, 0L, SEEK_SET);
fseek (dstfp, 0L, SEEK_SET);
@@ -486,7 +487,8 @@ parse_backtick (FILE *srcfp, FILE *dstfp)
return -1;
}
- while ((character = fgetc (srcfp)) != EOF) {
+ while (!feof (srcfp)) {
+ character = fgetc (srcfp);
if ((character == '`') && !escaped) {
if (in_backtick) {
cmd[i] = '\0';