We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 637e707 + 95a7ca5 commit d79fdc8Copy full SHA for d79fdc8
examples/chardev.c
@@ -36,7 +36,7 @@ enum {
36
/* Is device open? Used to prevent multiple access to device */
37
static atomic_t already_open = ATOMIC_INIT(CDEV_NOT_USED);
38
39
-static char msg[BUF_LEN]; /* The msg the device will give when asked */
+static char msg[BUF_LEN + 1]; /* The msg the device will give when asked */
40
41
static struct class *cls;
42
examples/chardev2.c
@@ -28,7 +28,7 @@ enum {
28
29
30
/* The message the device will give when asked */
31
-static char message[BUF_LEN];
+static char message[BUF_LEN + 1];
32
33
34
0 commit comments