diff options
Diffstat (limited to 'gdb/linux-fork.c')
-rw-r--r-- | gdb/linux-fork.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/linux-fork.c b/gdb/linux-fork.c index dbaa36eb4a7..fdea2474e72 100644 --- a/gdb/linux-fork.c +++ b/gdb/linux-fork.c @@ -297,8 +297,7 @@ fork_save_infrun_state (struct fork_info *fp, int clobber_regs) fp->maxfd = tmp; } /* Allocate array of file positions. */ - fp->filepos = xrealloc (fp->filepos, - (fp->maxfd + 1) * sizeof (*fp->filepos)); + fp->filepos = XRESIZEVEC (off_t, fp->filepos, fp->maxfd + 1); /* Initialize to -1 (invalid). */ for (tmp = 0; tmp <= fp->maxfd; tmp++) |