summaryrefslogtreecommitdiff
path: root/src/udev/libudev-queue-private.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2012-04-04 05:31:21 +0200
committerKay Sievers <kay.sievers@vrfy.org>2012-04-04 05:31:21 +0200
commit4b0060e68bab7bddbe8968082af8e042b8c11316 (patch)
tree48e347fef35f8f12c719436f4aa89f25cfc680ca /src/udev/libudev-queue-private.c
parent6df831f25ebc9f55cd939f04392dad9237706e45 (diff)
udev: fix gcc warnings
Diffstat (limited to 'src/udev/libudev-queue-private.c')
-rw-r--r--src/udev/libudev-queue-private.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/udev/libudev-queue-private.c b/src/udev/libudev-queue-private.c
index 71771950aa..d3e09e8b27 100644
--- a/src/udev/libudev-queue-private.c
+++ b/src/udev/libudev-queue-private.c
@@ -119,7 +119,7 @@ static int skip_to(FILE *file, long offset)
old_offset = ftell(file);
if (offset > old_offset && offset - old_offset <= BUFSIZ) {
size_t skip_bytes = offset - old_offset;
- char buf[skip_bytes];
+ char *buf = alloca(skip_bytes);
if (fread(buf, skip_bytes, 1, file) != skip_bytes)
return -1;