summaryrefslogtreecommitdiff
path: root/e2fsprogs/blkid/probe.c
diff options
context:
space:
mode:
authorMike Frysinger2005-06-11 22:37:25 +0000
committerMike Frysinger2005-06-11 22:37:25 +0000
commit7fde8debc450c19927b82e3434fc5d6a6dd4d35d (patch)
treeec0c844948d2fd786039f5ba39427a82e004506d /e2fsprogs/blkid/probe.c
parentd1a9d57bd6d9e40fb25564f10b0bd85f0a2c1e3a (diff)
downloadbusybox-7fde8debc450c19927b82e3434fc5d6a6dd4d35d.zip
busybox-7fde8debc450c19927b82e3434fc5d6a6dd4d35d.tar.gz
use malloc instead of xmalloc
Diffstat (limited to 'e2fsprogs/blkid/probe.c')
-rw-r--r--e2fsprogs/blkid/probe.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/e2fsprogs/blkid/probe.c b/e2fsprogs/blkid/probe.c
index 5fa37ad..5ae88b1 100644
--- a/e2fsprogs/blkid/probe.c
+++ b/e2fsprogs/blkid/probe.c
@@ -331,7 +331,7 @@ static int probe_swap1(int fd,
* pagesize).
*/
if (lseek(fd, 1024, SEEK_SET) < 0) return 1;
- if (!(sws = (struct swap_id_block *)malloc(1024))) return 1;
+ sws = (struct swap_id_block *)xmalloc(1024);
if (read(fd, sws, 1024) != 1024) {
free(sws);
return 1;
@@ -602,9 +602,8 @@ try_again:
if (lseek(fd, idx << 10, SEEK_SET) < 0)
continue;
- if (!(buf = (unsigned char *)malloc(1024)))
- continue;
-
+ buf = (unsigned char *)xmalloc(1024);
+
if (read(fd, buf, 1024) != 1024) {
free(buf);
continue;