mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-13 07:00:49 +02:00
commit bash-20160115 snapshot
This commit is contained in:
+1
-1
@@ -110,7 +110,7 @@ _print_malloc_stats (s, fp)
|
||||
}
|
||||
fprintf (fp, "\nTotal bytes in use: %lu, total bytes free: %lu\n",
|
||||
totused, totfree);
|
||||
fprintf (fp, "\nTotal bytes requested by application: %lu\n", _mstats.bytesreq);
|
||||
fprintf (fp, "\nTotal bytes requested by application: %lu\n", (unsigned long)_mstats.bytesreq);
|
||||
fprintf (fp, "Total mallocs: %d, total frees: %d, total reallocs: %d (%d copies)\n",
|
||||
_mstats.nmal, _mstats.nfre, _mstats.nrealloc, _mstats.nrcopy);
|
||||
fprintf (fp, "Total sbrks: %d, total bytes via sbrk: %d\n",
|
||||
|
||||
+1
-1
@@ -290,7 +290,7 @@ _register_dump_table(fp)
|
||||
{
|
||||
entry = mem_table[i];
|
||||
if (entry.mem)
|
||||
fprintf (fp, "%s[%d] %p:%d:%s:%s:%s:%d:%d:%d\n",
|
||||
fprintf (fp, "%s[%d] %p:%zu:%s:%s:%s:%d:%d:%d\n",
|
||||
(i == table_bucket_index) ? "*" : "",
|
||||
i,
|
||||
entry.mem, entry.size,
|
||||
|
||||
+2
-2
@@ -52,10 +52,10 @@ mtrace_alloc (tag, mem, size, file, line)
|
||||
_mtrace_fp = stderr;
|
||||
|
||||
if (_mtrace_verbose)
|
||||
fprintf (_mtrace_fp, "alloc: %s: %p (%d bytes) from '%s:%d'\n",
|
||||
fprintf (_mtrace_fp, "alloc: %s: %p (%zu bytes) from '%s:%d'\n",
|
||||
tag, mem, size, file ? file : "unknown", line);
|
||||
else
|
||||
fprintf (_mtrace_fp, "alloc:%p:%d:%s:%d\n",
|
||||
fprintf (_mtrace_fp, "alloc:%p:%zu:%s:%d\n",
|
||||
mem, size, file ? file : "unknown", line);
|
||||
}
|
||||
|
||||
|
||||
@@ -242,6 +242,7 @@ is greater than the history length, return a @code{NULL} pointer.
|
||||
|
||||
@deftypefun time_t history_get_time (HIST_ENTRY *entry)
|
||||
Return the time stamp associated with the history entry @var{entry}.
|
||||
If the timestamp is missing or invalid, return 0.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun int history_total_bytes (void)
|
||||
|
||||
@@ -475,7 +475,7 @@ history_truncate_file (fname, lines)
|
||||
int lines;
|
||||
{
|
||||
char *buffer, *filename, *tempname, *bp, *bp1; /* bp1 == bp+1 */
|
||||
int file, chars_read, rv, orig_lines, exists;
|
||||
int file, chars_read, rv, orig_lines, exists, r;
|
||||
struct stat finfo;
|
||||
size_t file_size;
|
||||
|
||||
@@ -611,7 +611,7 @@ history_truncate_file (fname, lines)
|
||||
with a shared history file, we don't want to leave the history file
|
||||
owned by root. */
|
||||
if (rv == 0 && exists)
|
||||
chown (filename, finfo.st_uid, finfo.st_gid);
|
||||
r = chown (filename, finfo.st_uid, finfo.st_gid);
|
||||
|
||||
xfree (filename);
|
||||
FREE (tempname);
|
||||
@@ -758,7 +758,7 @@ mmap_error:
|
||||
with a shared history file, we don't want to leave the history file
|
||||
owned by root. */
|
||||
if (rv == 0 && exists)
|
||||
chown (histname, finfo.st_uid, finfo.st_gid);
|
||||
mode = chown (histname, finfo.st_uid, finfo.st_gid);
|
||||
|
||||
FREE (histname);
|
||||
FREE (tempname);
|
||||
|
||||
Reference in New Issue
Block a user