From 6b5c2b4515b646db6be0f9307f53651620516521 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 15 Feb 2014 21:03:49 +0000 Subject: backlight: tidy use of BACKLIGHT_CLASS Use string concantenation to simply the sprintf slightly. Signed-off-by: Chris Wilson --- src/backlight.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backlight.c b/src/backlight.c index 70c65591..b7569294 100644 --- a/src/backlight.c +++ b/src/backlight.c @@ -143,7 +143,7 @@ __backlight_open(const char *iface, const char *file, int mode) char buf[1024]; int fd; - snprintf(buf, sizeof(buf), "%s/%s/%s", BACKLIGHT_CLASS, iface, file); + snprintf(buf, sizeof(buf), BACKLIGHT_CLASS "/%s/%s", iface, file); fd = open(buf, mode); if (fd == -1) return -1; -- cgit v1.2.3