[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    icecream/daemon
From:       Pino Toscano <pino () kde ! org>
Date:       2012-10-09 11:03:03
Message-ID: 20121009110303.91E83AC84E () svn ! kde ! org
[Download RAW message or body]

SVN commit 1319788 by pino:

shorten prefix_output to the required size

just use 32 characters for prefix_output, which are more than the required for the \
string, instead of misuse PATH_MAX (which would waste 4kb on Linux (and others) \
systems)


 M  +1 -1      serve.cpp  


--- trunk/icecream/daemon/serve.cpp #1319787:1319788
@@ -139,7 +139,7 @@
         memset(job_stat, 0, sizeof(job_stat));
 
         char tmp_output[PATH_MAX];
-        char prefix_output[PATH_MAX]; // I'm too lazy to calculate how many digits \
2^64 is :) +        char prefix_output[32]; // 20 for 2^64 + 6 for "icecc-" + 1 for \
trailing NULL  sprintf( prefix_output, "icecc-%d", job_id );
 
         if ( ( ret = dcc_make_tmpnam(prefix_output, ".o", tmp_output, 1 ) ) == 0 ) {


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic