MCPcopy Create free account
hub / github.com/ClusterLabs/pacemaker / print_spaces

Function print_spaces

lib/common/xml.c:981–995  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

979 } while(0)
980
981int
982print_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
997int
998log_data_element(

Callers 2

dump_data_elementFunction · 0.85
log_data_elementFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected