summaryrefslogtreecommitdiff
path: root/cmd-line-utils
diff options
context:
space:
mode:
authorvva@eagle.mysql.r18.ru <>2004-08-27 20:48:16 +0500
committervva@eagle.mysql.r18.ru <>2004-08-27 20:48:16 +0500
commitd5cb5c57d9c7f10f76c9910a1a1b41ba59d19bc2 (patch)
treede861c6938f631b30a00c9186eb731c91ddd27fa /cmd-line-utils
parente85ce08901b8718c55face18f9e36e6778597846 (diff)
parent1dee12bba4a8fda26e7ebe3c8ddd0eb767baffae (diff)
downloadmariadb-git-d5cb5c57d9c7f10f76c9910a1a1b41ba59d19bc2.tar.gz
Merge vvagin@bk-internal.mysql.com:/home/bk/mysql-4.1
into eagle.mysql.r18.ru:/home/vva/work/mysql.orig/test/mysql-4.1
Diffstat (limited to 'cmd-line-utils')
-rw-r--r--cmd-line-utils/libedit/history.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/cmd-line-utils/libedit/history.c b/cmd-line-utils/libedit/history.c
index 0294734b9a3..53648203bf0 100644
--- a/cmd-line-utils/libedit/history.c
+++ b/cmd-line-utils/libedit/history.c
@@ -661,12 +661,6 @@ history_load(History *h, const char *fname)
if ((fp = fopen(fname, "r")) == NULL)
return (i);
- if ((line = fgetln(fp, &sz)) == NULL)
- goto done;
-
- if (strncmp(line, hist_cookie, sz) != 0)
- goto done;
-
ptr = h_malloc(max_size = 1024);
if (ptr == NULL)
goto done;
@@ -720,8 +714,6 @@ history_save(History *h, const char *fname)
if (fchmod(fileno(fp), S_IRUSR|S_IWUSR) == -1)
goto done;
- if (fputs(hist_cookie, fp) == EOF)
- goto done;
ptr = h_malloc(max_size = 1024);
if (ptr == NULL)
goto done;
@@ -740,7 +732,7 @@ history_save(History *h, const char *fname)
ptr = nptr;
}
(void) strvis(ptr, ev.str, VIS_WHITE);
- (void) fprintf(fp, "%s\n", ptr);
+ (void) fprintf(fp, "%s\n", ev.str);
}
oomem:
h_free((ptr_t)ptr);