[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdeutils/klaptopdaemon
From: Adriaan de Groot <groot () kde ! org>
Date: 2005-04-05 21:05:17
Message-ID: 20050405210517.D6F66492 () office ! kde ! org
[Download RAW message or body]
CVS commit by adridg:
Be consistent wrt. writing strings into char buffers
M +2 -1 acpi_helper.cpp 1.18
--- kdeutils/klaptopdaemon/acpi_helper.cpp #1.17:1.18
@@ -212,5 +212,6 @@ main(int argc, char **argv)
char str[MAX_TOSHIBA_STRING];
- snprintf(str,MAX_TOSHIBA_STRING-1,"brightness : %d",toshibalcd_val);
+ snprintf(str,sizeof(str),"brightness : %d",toshibalcd_val);
+ str[sizeof(str)-1]=0;
write(fd,str,strlen(str));
close(fd);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic