From: Guus Sliepen Date: Tue, 29 Jul 2014 16:21:44 +0000 (+0200) Subject: Don't use errno as a local variable, because it's a macro. X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=f4158fd7685a465f2170b92401243dff0397fb01;p=meshlink Don't use errno as a local variable, because it's a macro. --- diff --git a/src/meshlink.c b/src/meshlink.c index b27d97c6..80404370 100644 --- a/src/meshlink.c +++ b/src/meshlink.c @@ -629,8 +629,8 @@ static const char *errstr[] = { [MESHLINK_ENOENT] = "No such node", }; -const char *meshlink_strerror(meshlink_errno_t errno) { - return errstr[errno]; +const char *meshlink_strerror(meshlink_errno_t err) { + return errstr[err]; } static bool ecdsa_keygen(meshlink_handle_t *mesh) { diff --git a/src/meshlink.h b/src/meshlink.h index a21af570..85a0cb75 100644 --- a/src/meshlink.h +++ b/src/meshlink.h @@ -69,11 +69,11 @@ struct meshlink_channel { /// Get the text for the given MeshLink error code. /** This function returns a pointer to the string containing the description of the given error code. * - * @param errno An error code returned by MeshLink. + * @param err An error code returned by MeshLink. * * @return A pointer to a string containing the description of the error code. */ -extern const char *meshlink_strerror(meshlink_errno_t errno); +extern const char *meshlink_strerror(meshlink_errno_t err); /// Open or create a MeshLink instance. /** This function opens or creates a MeshLink instance.