]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/linux-fork.c
Add casts to memory allocation related calls
[thirdparty/binutils-gdb.git] / gdb / linux-fork.c
index dbaa36eb4a7ad6467ebf24f7a64594425301cf1a..fdea2474e7292ada5343df64d17678a9588b94f3 100644 (file)
@@ -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++)