1
0
Fork 0

gigaset: skip unnecessary hex formatting

Don't generate the hex representation of the payload data if it
isn't actually used afterwards.

Impact: optimization
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
hifive-unleashed-5.1
Tilman Schmidt 2009-05-13 12:44:17 +00:00 committed by David S. Miller
parent 42e3d61115
commit 1315d69634
1 changed files with 4 additions and 0 deletions

View File

@ -246,6 +246,10 @@ static inline void dump_bytes(enum debuglevel level, const char *tag,
unsigned char c;
static char dbgline[3 * 32 + 1];
int i = 0;
if (!(gigaset_debuglevel & level))
return;
while (count-- > 0) {
if (i > sizeof(dbgline) - 4) {
dbgline[i] = '\0';