Re: [PATCH libdrm 1/2] xf86drm: merge get_normal_pci_path() into get_real_pci_path()

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

 



Hi Eric,
On 5 September 2018 at 13:31, Eric Engestrom <eric.engestrom@xxxxxxxxx> wrote:

> -static char *
> +static void
>  get_real_pci_path(int maj, int min, char *real_path)
>  {
>      char path[PATH_MAX + 1], *term;
>
>      snprintf(path, sizeof(path), "/sys/dev/char/%d:%d/device", maj, min);
> -    if (!realpath(path, real_path))
> -        return NULL;
> +    if (!realpath(path, real_path)) {
> +        strcpy(real_path, path);
> +        return;
> +    }
>
I'm slightly inclined towards squashing this with 2/2 since as-is the
function name is misleading.

Either way, for the lot:
Reviewed-by: Emil Velikov <emil.velikov@xxxxxxxxxxxxx>

-Emil
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux