From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from inx.pm.waw.pl ([195.116.170.130]) by canuck.infradead.org with esmtps (Exim 4.72 #1 (Red Hat Linux)) id 1PVCvA-00041g-Nx for barebox@lists.infradead.org; Wed, 22 Dec 2010 00:51:14 +0000 From: Krzysztof Halasa References: Date: Wed, 22 Dec 2010 01:51:03 +0100 In-Reply-To: (Krzysztof Halasa's message of "Mon, 20 Dec 2010 23:30:03 +0100") Message-ID: MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 5a] Fix error handling with malloc, memalign etc. Introduce xmemalign(). To: barebox@lists.infradead.org U2lnbmVkLW9mZi1ieTogS3J6eXN6dG9mIEhhxYJhc2EgPGtoY0BwbS53YXcucGw+CgpkaWZmIC0t Z2l0IGEvYXJjaC9hcm0vY3B1L21tdS5jIGIvYXJjaC9hcm0vY3B1L21tdS5jCmluZGV4IDA4YTU3 Y2UuLmRmNjY0ZjYgMTAwNjQ0Ci0tLSBhL2FyY2gvYXJtL2NwdS9tbXUuYworKysgYi9hcmNoL2Fy bS9jcHUvbW11LmMKQEAgLTk1LDEzICs5NSw3IEBAIHZvaWQgc2V0dXBfZG1hX2NvaGVyZW50KHVu c2lnbmVkIGxvbmcgb2Zmc2V0KQogCiB2b2lkICpkbWFfYWxsb2NfY29oZXJlbnQoc2l6ZV90IHNp emUpCiB7Ci0Jdm9pZCAqbWVtOwotCi0JbWVtID0gbWVtYWxpZ24oNDA5Niwgc2l6ZSk7Ci0JaWYg KG1lbSkKLQkJcmV0dXJuIG1lbSArIGRtYV9jb2hlcmVudF9vZmZzZXQ7Ci0KLQlyZXR1cm4gTlVM TDsKKwlyZXR1cm4geG1lbWFsaWduKDQwOTYsIHNpemUpICsgZG1hX2Nv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