| 979 | } while(0) |
| 980 | |
| 981 | int |
| 982 | print_spaces(char *buffer, int depth, int max) |
| 983 | { |
| 984 | int lpc = 0; |
| 985 | int spaces = 2*depth; |
| 986 | max--; |
| 987 | |
| 988 | /* <= so that we always print 1 space - prevents problems with syslog */ |
| 989 | for(lpc = 0; lpc <= spaces && lpc < max; lpc++) { |
| 990 | if(sprintf(buffer+lpc, "%c", ' ') < 1) { |
| 991 | return -1; |
| 992 | } |
| 993 | } |
| 994 | return lpc; |
| 995 | } |
| 996 | |
| 997 | int |
| 998 | log_data_element( |
no outgoing calls
no test coverage detected