> * clean up btrfs_decode_error and callers
> -static const char *btrfs_decode_error(int errno, char nbuf[16])
> +static const char *btrfs_decode_error(int errno)
> {
> - char *errstr = NULL;
> + char *errstr = "unknown";
>
> switch (errno) {
> case -EIO:
> @@ -80,12 +80,6 @@ static const char *btrfs_decode_error(int errno, char nbuf[16])
> case -EEXIST:
> errstr = "Object already exists";
> break;
> - default:
> - if (nbuf) {
> - if (snprintf(nbuf, 16, "error %d", -errno) >= 0)
> - errstr = nbuf;
> - }
> - break;
> }
>
> return errstr;
Cool, thanks for cleaning that up.
- z
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html