summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-02-15 21:03:49 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2014-02-15 21:03:49 +0000
commit6b5c2b4515b646db6be0f9307f53651620516521 (patch)
tree778f1b02b8979c79c9ec693a60222b96df41cc39
parenteb7d2b19e2829b00317991fba05352e3ba1a1902 (diff)
backlight: tidy use of BACKLIGHT_CLASS
Use string concantenation to simply the sprintf slightly. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/backlight.c2
1 files changed, 1 insertions, 1 deletions
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;