summaryrefslogtreecommitdiff
path: root/tools/intel_lid.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/intel_lid.c')
-rw-r--r--tools/intel_lid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/intel_lid.c b/tools/intel_lid.c
index 908224ee..51a95fee 100644
--- a/tools/intel_lid.c
+++ b/tools/intel_lid.c
@@ -85,7 +85,7 @@ static int i830_lvds_acpi_lid_state(void)
}
}
state_name = malloc(strlen(ACPI_LID) + strlen(lid_dent->d_name) + 7);
- memset(state_name, 0, sizeof(state_name));
+ memset(state_name, 0, strlen(ACPI_LID) + strlen(lid_dent->d_name) + 7);
strcat(state_name, ACPI_LID);
strcat(state_name, lid_dent->d_name);
strcat(state_name, "/state");