[PATCH libdrm 1/2] xf86drm: merge get_normal_pci_path() into get_real_pci_path()
Emil Velikov
emil.l.velikov at gmail.com
Wed Sep 5 12:58:23 UTC 2018
Hi Eric,
On 5 September 2018 at 13:31, Eric Engestrom <eric.engestrom at intel.com> 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 at collabora.com>
-Emil
More information about the dri-devel
mailing list