diff options
author | Erik Andersen | 2000-03-21 22:32:57 +0000 |
---|---|---|
committer | Erik Andersen | 2000-03-21 22:32:57 +0000 |
commit | 0d068a20676144e9fd6796cc77764c420d785394 (patch) | |
tree | af12b114d51e9ae7a8753baf09feb9ab8d654f26 /sfdisk.c | |
parent | c053e41fa0524d828bf90f47e5e3637b8facaadc (diff) | |
download | busybox-0d068a20676144e9fd6796cc77764c420d785394.zip busybox-0d068a20676144e9fd6796cc77764c420d785394.tar.gz |
* all mallocs now use xmalloc (and so are OOM error safe), and
the common error handling saves a few bytes. Thanks to
Bob Tinsley <bob@earthrise.demon.co.uk> for the patch.
-Erik
Diffstat (limited to 'sfdisk.c')
-rw-r--r-- | sfdisk.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -300,8 +300,7 @@ static struct sector *get_sector(char *dev, int fd, unsigned long sno) if (!sseek(dev, fd, sno)) return 0; - if (!(s = (struct sector *) malloc(sizeof(struct sector)))) - fatalError("out of memory - giving up\n"); + s = (struct sector *) xmalloc(sizeof(struct sector)); if (read(fd, s->data, sizeof(s->data)) != sizeof(s->data)) { perror("read"); |