From 99fe8fb0f6e77eeb81372c10376b527d97d24c55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sun, 11 Jan 2009 14:19:20 +0000 Subject: [PATCH] * "" is not really a good error description. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28879 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/libroot/posix/string/strerror.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/system/libroot/posix/string/strerror.c b/src/system/libroot/posix/string/strerror.c index 90ea68dfe1..a5d3aabe20 100644 --- a/src/system/libroot/posix/string/strerror.c +++ b/src/system/libroot/posix/string/strerror.c @@ -1,5 +1,5 @@ /* - * Copyright 2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved. + * Copyright 2005-2009, Axel Dörfler, axeld@pinc-software.de. * Distributed under the terms of the MIT license. * * Copyright 2001, Dan Sinclair. All rights reserved. @@ -33,7 +33,8 @@ static const struct error_base { {B_DEVICE_ERROR_BASE, "Device "}, {B_ERRORS_END, "Application "}, }; -static const uint32 kNumErrorBases = sizeof(kErrorBases) / sizeof(struct error_base); +static const uint32 kNumErrorBases = sizeof(kErrorBases) + / sizeof(struct error_base); static char * @@ -396,8 +397,8 @@ error_description(int error) case B_NO_TRANSLATOR: return "No translator found"; case B_ILLEGAL_DATA: - return ""; - + return "Illegal data"; + // Other POSIX Errors case ENFILE: @@ -562,6 +563,6 @@ strerror_r(int error, char *buffer, size_t bufferSize) strlcpy(buffer, description, bufferSize); return 0; - // ToDo: could return ERANGE if buffer is too small + // TODO: could return ERANGE if buffer is too small }