cleanup: remove unnecessary (=invisible) leading spaces

This commit is contained in:
marschap
2006-04-27 15:10:59 +00:00
parent 9b111eeac4
commit d4a3e7444d
40 changed files with 212 additions and 212 deletions
+6 -6
View File
@@ -86,7 +86,7 @@ int config_read_file(char *filename)
#ifdef WITH_LDAP_SUPPORT
if (ldap_is_ldap_url(filename)) {
use_ldap = 1;
if (0 != (retval = ldap_url_parse(filename, &url))) {
report(RPT_ERR, "Errors parsing LDAP URL %s: %s", filename, ldap_err2string(retval));
ldap_free_urldesc(url);
@@ -302,7 +302,7 @@ connect_to_ldap(void)
* }
* fprintf(stderr, "LDAP login successful on %s:%d\n", ldap_host, ldap_port);
********************************************************/
/* check for the existence of the config object... */
if (LDAP_SUCCESS != (retval = ldap_search_s(ld, ldap_base_dn, LDAP_SCOPE_BASE, "objectClass=lcdprocConfig", NULL, 0, &res))) {
report(RPT_ERR, "Could not access LDAP server on %s:%d", ldap_host, ldap_port);
@@ -441,12 +441,12 @@ key * find_key(section * s, char * keyname, int skip)
return NULL;
}
strcpy(buf, "lcdproc");
strncat(buf, keyname, BUFSIZE);
/* debug(RPT_DEBUG, "Key name translated to attribute name: %s", buf); */
vals = ldap_get_values(ld, entry, buf);
if (skip+1 > ldap_count_values(vals)) {
debug(RPT_DEBUG, "No such entry found.");
if (NULL != buf) {
@@ -474,14 +474,14 @@ key * find_key(section * s, char * keyname, int skip)
buf=strdup(vals[skip]);
debug(RPT_DEBUG, "Entry found. Value is: %s", buf);
ldap_value_free(vals);
k = (key *) malloc(sizeof(key));
if ( k != NULL) {
k->name = strdup(keyname);
k->value = strdup(buf);
k->next_key = NULL;
}
if (NULL != buf) {
free(buf);
buf = NULL;
+2 -2
View File
@@ -24,11 +24,11 @@ buffile *buffile_open( const char *path, const char *mode ) {
file = malloc(sizeof(*file));
if ( NULL == file )
return NULL;
file->pos=0;
file->bytesread=0;
file->buf=NULL;
file->f = fopen( path, mode );
if( NULL == file->f ) {
free(file);
+3 -3
View File
@@ -90,7 +90,7 @@ sock_connect (char *host, unsigned short int port)
#else
{
unsigned long tmp = 1;
if (ioctlsocket(sock, FIONBIO, &tmp) == SOCKET_ERROR)
report(RPT_ERR, "sock_connect: Error setting socket to non-blocking");
}
@@ -130,7 +130,7 @@ sock_printf(int fd, const char *format, .../*args*/ )
}
if (size > sizeof(buf))
report(RPT_WARNING, "sock_printf: vsnprintf truncated message");
return sock_send_string(fd, buf);
}
@@ -316,7 +316,7 @@ sock_printf_error(int fd, const char *format, .../*args*/ )
int size = 0;
strncpy(buf, huh, sizeof(huh)); // note: sizeof(huh) < MAXMSG
va_start(ap, format);
size = vsnprintf(buf + (sizeof(huh)-1), sizeof(buf) - (sizeof(huh)-1), format, ap);
buf[sizeof(buf)-1] = '\0';