The size is there to not overflow the buf, so just use the buf size.

SVN revision: 15275
This commit is contained in:
sebastid 2005-06-12 14:08:46 +00:00 committed by sebastid
parent 7523c7699b
commit 62e822d67e
1 changed files with 1 additions and 2 deletions

View File

@ -72,8 +72,7 @@ ecore_file_app_installed(const char *app)
while ((dir = ecore_list_next(__ecore_file_path_bin)) != NULL)
{
snprintf(buf, strlen(dir) + strlen(app) + 2, "%s/%s", dir, app);
// 2 = "/" + "\0"
snprintf(buf, sizeof(buf), "%s/%s", dir, app);
if (ecore_file_exists(buf) && ecore_file_can_exec(buf))
{
found = 1;