Re: [PATCH v2] btrfs: clean up transaction abort messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> * 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


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux