From: Fabian Keil Date: Fri, 9 Mar 2012 17:55:50 +0000 (+0000) Subject: Follow-up fixes for the previous white-space changes X-Git-Tag: v_3_0_20~392 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=8675bc0559b182e88e9dfbfd98cc9c9f8717cf0b Follow-up fixes for the previous white-space changes Clearly the commits belong together, but somebody failed to squash them. --- diff --git a/cgi.c b/cgi.c index 60eb0611..c0f1270e 100644 --- a/cgi.c +++ b/cgi.c @@ -1,4 +1,4 @@ -const char cgi_rcs[] = "$Id: cgi.c,v 1.148 2012/03/09 16:23:50 fabiankeil Exp $"; +const char cgi_rcs[] = "$Id: cgi.c,v 1.149 2012/03/09 16:24:36 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/cgi.c,v $ @@ -312,7 +312,7 @@ struct http_response *dispatch_cgi(struct client_state *csp) /* Note: "example.com" and "example.com." are equivalent hostnames. */ /* Either the host matches CGI_SITE_1_HOST ..*/ - if ( ( (0 == strcmpic(host, CGI_SITE_1_HOST)) + if ( ( (0 == strcmpic(host, CGI_SITE_1_HOST)) || (0 == strcmpic(host, CGI_SITE_1_HOST "."))) && (path[0] == '/')) { @@ -320,7 +320,7 @@ struct http_response *dispatch_cgi(struct client_state *csp) path++; } /* Or it's the host part CGI_SITE_2_HOST, and the path CGI_SITE_2_PATH */ - else if (( (0 == strcmpic(host, CGI_SITE_2_HOST)) + else if (( (0 == strcmpic(host, CGI_SITE_2_HOST)) || (0 == strcmpic(host, CGI_SITE_2_HOST "."))) && (0 == strncmpic(path, CGI_SITE_2_PATH, strlen(CGI_SITE_2_PATH)))) { @@ -1808,7 +1808,7 @@ jb_err template_load(const struct client_state *csp, char **template_ptr, /* Validate template name. Paranoia. */ for (p = templatename; *p != 0; p++) { - if (((*p < 'a') || (*p > 'z')) + if ( ((*p < 'a') || (*p > 'z')) && ((*p < 'A') || (*p > 'Z')) && ((*p < '0') || (*p > '9')) && (*p != '-') diff --git a/cgiedit.c b/cgiedit.c index 6f68d6f6..f653b4e7 100644 --- a/cgiedit.c +++ b/cgiedit.c @@ -1,4 +1,4 @@ -const char cgiedit_rcs[] = "$Id: cgiedit.c,v 1.73 2012/03/09 16:23:50 fabiankeil Exp $"; +const char cgiedit_rcs[] = "$Id: cgiedit.c,v 1.74 2012/03/09 16:24:36 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/cgiedit.c,v $ @@ -494,7 +494,7 @@ jb_err cgi_edit_actions_url_form(struct client_state *csp, cur_line = cur_line->next; } - if ((cur_line == NULL) + if ( (cur_line == NULL) || (line_number != patternid) || (patternid < 1U) || (cur_line->type != FILE_LINE_URL)) @@ -654,7 +654,7 @@ jb_err cgi_edit_actions_remove_url_form(struct client_state *csp, cur_line = cur_line->next; } - if ((cur_line == NULL) + if ( (cur_line == NULL) || (line_number != patternid) || (patternid < 1U) || (cur_line->type != FILE_LINE_URL)) @@ -1135,7 +1135,7 @@ jb_err edit_parse_actions_file(struct editable_file * file) * empty (which is valid, but pointless). */ while ((cur_line != NULL) - && (cur_line->unprocessed[0] == '\0')) + && (cur_line->unprocessed[0] == '\0')) { /* Blank line */ cur_line->type = FILE_LINE_BLANK; @@ -1143,7 +1143,7 @@ jb_err edit_parse_actions_file(struct editable_file * file) } if ((cur_line != NULL) - && (cur_line->unprocessed[0] != '{')) + && (cur_line->unprocessed[0] != '{')) { /* File doesn't start with a header */ file->parse_error = cur_line; @@ -1152,7 +1152,7 @@ jb_err edit_parse_actions_file(struct editable_file * file) } if ((cur_line != NULL) && (0 == - match_actions_file_header_line(cur_line->unprocessed, "settings")) ) + match_actions_file_header_line(cur_line->unprocessed, "settings"))) { cur_line->type = FILE_LINE_SETTINGS_HEADER; @@ -1187,7 +1187,7 @@ jb_err edit_parse_actions_file(struct editable_file * file) } if ((cur_line != NULL) && (0 == - match_actions_file_header_line(cur_line->unprocessed, "description")) ) + match_actions_file_header_line(cur_line->unprocessed, "description"))) { cur_line->type = FILE_LINE_DESCRIPTION_HEADER; @@ -1207,7 +1207,7 @@ jb_err edit_parse_actions_file(struct editable_file * file) } if ((cur_line != NULL) && (0 == - match_actions_file_header_line(cur_line->unprocessed, "alias")) ) + match_actions_file_header_line(cur_line->unprocessed, "alias"))) { cur_line->type = FILE_LINE_ALIAS_HEADER; @@ -1318,7 +1318,7 @@ jb_err edit_parse_actions_file(struct editable_file * file) } while ((len > (size_t)0) && ((text[len - 1] == ' ') - || (text[len - 1] == '\t')) ) + || (text[len - 1] == '\t'))) { len--; } @@ -1779,7 +1779,7 @@ static jb_err get_file_name_param(struct client_state *csp, s = param; while ((ch = *s++) != '\0') { - if (((ch < 'A') || (ch > 'Z')) + if ( ((ch < 'A') || (ch > 'Z')) && ((ch < 'a') || (ch > 'z')) && ((ch < '0') || (ch > '9')) && (ch != '-') @@ -2331,14 +2331,14 @@ jb_err cgi_edit_actions_list(struct client_state *csp, * cur_line->next = / * cur_line->next->next = {...actions...} or EOF */ - if ((cur_line != NULL) + if ( (cur_line != NULL) && (cur_line->type == FILE_LINE_ACTION) && (cur_line->next != NULL) && (cur_line->next->type == FILE_LINE_URL) && (0 == strcmp(cur_line->next->unprocessed, "/")) - && ((cur_line->next->next == NULL) + && ( (cur_line->next->next == NULL) || (cur_line->next->next->type != FILE_LINE_URL) - ) ) + ) ) { /* * Generate string with buttons to set actions for "/" to @@ -2669,7 +2669,7 @@ jb_err cgi_edit_actions_list(struct client_state *csp, if (!err) err = map(section_exports, "s-next", 1, buf, 1); if ((cur_line != NULL) - && (cur_line->type == FILE_LINE_ACTION)) + && (cur_line->type == FILE_LINE_ACTION)) { /* Not last section */ if (!err) err = map_block_keep(section_exports, "s-next-exists"); @@ -2793,7 +2793,7 @@ jb_err cgi_edit_actions_for_url(struct client_state *csp, cur_line = cur_line->next; } - if ((cur_line == NULL) + if ( (cur_line == NULL) || (line_number != sectionid) || (sectionid < 1) || (cur_line->type != FILE_LINE_ACTION)) @@ -3072,7 +3072,7 @@ jb_err cgi_edit_actions_submit(struct client_state *csp, cur_line = cur_line->next; } - if ((cur_line == NULL) + if ( (cur_line == NULL) || (line_number != sectionid) || (sectionid < 1) || (cur_line->type != FILE_LINE_ACTION)) @@ -3364,7 +3364,7 @@ jb_err cgi_edit_actions_url(struct client_state *csp, } if ((cur_line == NULL) - || (cur_line->type != FILE_LINE_URL)) + || (cur_line->type != FILE_LINE_URL)) { /* Invalid "patternid" parameter */ free(new_pattern); @@ -3476,7 +3476,7 @@ jb_err cgi_edit_actions_add_url(struct client_state *csp, } if ((cur_line == NULL) - || (cur_line->type != FILE_LINE_ACTION)) + || (cur_line->type != FILE_LINE_ACTION)) { /* Invalid "sectionid" parameter */ free(new_pattern); @@ -3598,7 +3598,7 @@ jb_err cgi_edit_actions_remove_url(struct client_state *csp, line_number++; } - if ((cur_line == NULL) + if ( (cur_line == NULL) || (prev_line == NULL) || (cur_line->type != FILE_LINE_URL)) { @@ -3706,7 +3706,7 @@ jb_err cgi_edit_actions_section_remove(struct client_state *csp, } if ((cur_line == NULL) - || (cur_line->type != FILE_LINE_ACTION)) + || (cur_line->type != FILE_LINE_ACTION)) { /* Invalid "sectionid" parameter */ edit_free_file(file); @@ -3714,7 +3714,7 @@ jb_err cgi_edit_actions_section_remove(struct client_state *csp, } if ((cur_line->next != NULL) - && (cur_line->next->type == FILE_LINE_URL)) + && (cur_line->next->type == FILE_LINE_URL)) { /* Section not empty. */ edit_free_file(file); @@ -3851,7 +3851,7 @@ jb_err cgi_edit_actions_section_add(struct client_state *csp, } if ((cur_line == NULL) - || (cur_line->type != FILE_LINE_ACTION)) + || (cur_line->type != FILE_LINE_ACTION)) { /* Invalid "sectionid" parameter */ edit_free_file(file); @@ -3860,7 +3860,7 @@ jb_err cgi_edit_actions_section_add(struct client_state *csp, /* Skip through the section to find the last line in it. */ while ((cur_line->next != NULL) - && (cur_line->next->type != FILE_LINE_ACTION)) + && (cur_line->next->type != FILE_LINE_ACTION)) { cur_line = cur_line->next; line_number++; @@ -4019,7 +4019,7 @@ jb_err cgi_edit_actions_section_swap(struct client_state *csp, } if ((cur_line == NULL) - || (cur_line->type != FILE_LINE_ACTION)) + || (cur_line->type != FILE_LINE_ACTION)) { /* Invalid "section1" parameter */ edit_free_file(file); @@ -4051,7 +4051,7 @@ jb_err cgi_edit_actions_section_swap(struct client_state *csp, } if ((cur_line == NULL) - || (cur_line->type != FILE_LINE_ACTION)) + || (cur_line->type != FILE_LINE_ACTION)) { /* Invalid "section2" parameter */ edit_free_file(file); diff --git a/cgisimple.c b/cgisimple.c index 010497b3..95cb7ad6 100644 --- a/cgisimple.c +++ b/cgisimple.c @@ -1,4 +1,4 @@ -const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.113 2012/03/09 16:23:50 fabiankeil Exp $"; +const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.114 2012/03/09 16:24:36 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/cgisimple.c,v $ @@ -1183,7 +1183,7 @@ jb_err cgi_show_url_info(struct client_state *csp, (global_toggle_state == 1) && #endif /* def FEATURE_TOGGLE */ map_block_killer(exports, "privoxy-is-toggled-off") - ) + ) { free_map(exports); return JB_ERR_MEMORY; diff --git a/encode.c b/encode.c index d61ae72d..d7418eeb 100644 --- a/encode.c +++ b/encode.c @@ -1,4 +1,4 @@ -const char encode_rcs[] = "$Id: encode.c,v 1.25 2012/03/09 16:23:50 fabiankeil Exp $"; +const char encode_rcs[] = "$Id: encode.c,v 1.26 2012/03/09 16:24:36 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/encode.c,v $ @@ -428,7 +428,7 @@ char *percent_encode_url(const char *s) { char c; char *p = buf; - while((c = *s++) != '\0') + while ((c = *s++) != '\0') { const unsigned int i = (unsigned char)c; if (i >= sizeof(allowed_characters) || '\0' == allowed_characters[i]) diff --git a/errlog.c b/errlog.c index 1cd39a33..6e31e68d 100644 --- a/errlog.c +++ b/errlog.c @@ -1,4 +1,4 @@ -const char errlog_rcs[] = "$Id: errlog.c,v 1.112 2011/09/04 11:10:56 fabiankeil Exp $"; +const char errlog_rcs[] = "$Id: errlog.c,v 1.113 2012/03/09 16:23:50 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/errlog.c,v $ @@ -666,7 +666,7 @@ void log_error(int loglevel, const char *fmt, ...) #ifndef _WIN32 || (logfp == NULL) #endif - ) + ) { if (loglevel == LOG_LEVEL_FATAL) { @@ -887,7 +887,7 @@ void log_error(int loglevel, const char *fmt, ...) if ((length >= log_buffer_size) || (outbuf[log_buffer_size-1] != '\0') || (outbuf[log_buffer_size] != '\0') - ) + ) { /* Repeat as assertions */ assert(length < log_buffer_size); diff --git a/filters.c b/filters.c index 480190a2..e9d724c7 100644 --- a/filters.c +++ b/filters.c @@ -1,4 +1,4 @@ -const char filters_rcs[] = "$Id: filters.c,v 1.168 2012/03/09 16:23:50 fabiankeil Exp $"; +const char filters_rcs[] = "$Id: filters.c,v 1.169 2012/03/09 16:24:36 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/filters.c,v $ @@ -261,7 +261,7 @@ int block_acl(const struct access_control_addr *dst, const struct client_state * #else (csp->ip_addr_long & acl->src->mask) == acl->src->addr #endif - ) + ) { if (dst == NULL) { @@ -291,7 +291,7 @@ int block_acl(const struct access_control_addr *dst, const struct client_state * ((dst->addr & acl->dst->mask) == acl->dst->addr) && ((dst->port == acl->dst->port) || (acl->dst->port == 0)) #endif - ) + ) { if (acl->action == ACL_PERMIT) { @@ -374,7 +374,7 @@ int acl_addr(const char *aspec, struct access_control_addr *aca) #else (masklength > 32) #endif - ) + ) { freez(acl_spec); return(-1); @@ -1174,10 +1174,10 @@ char *get_last_url(char *subject, const char *redirect_mode) } if ((new_url != NULL) - && ( (new_url != subject) + && ( (new_url != subject) || (0 == strncmpic(subject, "http://", 7)) || (0 == strncmpic(subject, "https://", 8)) - )) + )) { /* * Return new URL if we found a redirect @@ -1472,7 +1472,7 @@ int is_untrusted_url(const struct client_state *csp) string_append(&new_entry, csp->http->hostport); path = csp->http->path; - if ((path[0] == '/') + if ( (path[0] == '/') && (path[1] == '~') && ((path_end = strchr(path + 2, '/')) != NULL)) { @@ -1719,8 +1719,8 @@ static char *gif_deanimate_response(struct client_state *csp) size = (size_t)(csp->iob->eod - csp->iob->cur); - if ( (NULL == (in = (struct binbuffer *)zalloc(sizeof *in))) - || (NULL == (out = (struct binbuffer *)zalloc(sizeof *out)))) + if ( (NULL == (in = (struct binbuffer *)zalloc(sizeof *in ))) + || (NULL == (out = (struct binbuffer *)zalloc(sizeof *out))) ) { log_error(LOG_LEVEL_DEANIMATE, "failed! (no mem)"); return NULL; diff --git a/gateway.c b/gateway.c index abc72725..be318dea 100644 --- a/gateway.c +++ b/gateway.c @@ -1,4 +1,4 @@ -const char gateway_rcs[] = "$Id: gateway.c,v 1.84 2012/02/29 19:35:11 fabiankeil Exp $"; +const char gateway_rcs[] = "$Id: gateway.c,v 1.85 2012/03/09 16:23:50 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/gateway.c,v $ @@ -377,7 +377,7 @@ int connection_destination_matches(const struct reusable_connection *connection, return FALSE; } - if (( (NULL != connection->gateway_host) + if (( (NULL != connection->gateway_host) && (NULL != fwd->gateway_host) && strcmpic(connection->gateway_host, fwd->gateway_host)) && (connection->gateway_host != fwd->gateway_host)) @@ -388,7 +388,7 @@ int connection_destination_matches(const struct reusable_connection *connection, return FALSE; } - if (( (NULL != connection->forward_host) + if (( (NULL != connection->forward_host) && (NULL != fwd->forward_host) && strcmpic(connection->forward_host, fwd->forward_host)) && (connection->forward_host != fwd->forward_host)) @@ -1077,7 +1077,7 @@ static jb_socket socks5_connect(const struct forward_spec *fwd, strncpy(cbuf + client_pos, target_host, sizeof(cbuf) - client_pos); client_pos += (hostlen & 0xffu); cbuf[client_pos++] = (char)((target_port >> 8) & 0xff); - cbuf[client_pos++] = (char)((target_port ) & 0xff); + cbuf[client_pos++] = (char)((target_port ) & 0xff); if (write_socket(sfd, cbuf, client_pos)) { diff --git a/list.c b/list.c index d779d4e5..fcafb577 100644 --- a/list.c +++ b/list.c @@ -1,4 +1,4 @@ -const char list_rcs[] = "$Id: list.c,v 1.27 2012/03/04 11:41:32 fabiankeil Exp $"; +const char list_rcs[] = "$Id: list.c,v 1.28 2012/03/09 16:23:50 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/list.c,v $ @@ -977,7 +977,7 @@ jb_err map(struct map *the_map, assert(the_map); - if ((NULL == value) + if ( (NULL == value) || (NULL == name) || (NULL == (new_entry = zalloc(sizeof(*new_entry))))) { diff --git a/loaders.c b/loaders.c index 2362127f..f277c51b 100644 --- a/loaders.c +++ b/loaders.c @@ -1,4 +1,4 @@ -const char loaders_rcs[] = "$Id: loaders.c,v 1.88 2012/03/09 16:23:50 fabiankeil Exp $"; +const char loaders_rcs[] = "$Id: loaders.c,v 1.89 2012/03/09 16:24:36 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/loaders.c,v $ @@ -221,7 +221,7 @@ unsigned int sweep(void) while (fl != NULL) { - if (( 0 == fl->active) && ( NULL != fl->unloader ) ) + if ((0 == fl->active) && (NULL != fl->unloader)) { nfl->next = fl->next; @@ -570,7 +570,7 @@ jb_err edit_read_line(FILE *fp, /* Main loop. Loop while we need more data & it's not EOF. */ while ((contflag || is_empty) - && (JB_ERR_OK == (rval = simple_read_line(fp, &linebuf, newline)))) + && (JB_ERR_OK == (rval = simple_read_line(fp, &linebuf, newline)))) { if (line_number) { diff --git a/miscutil.c b/miscutil.c index a002abb7..61ef5831 100644 --- a/miscutil.c +++ b/miscutil.c @@ -1,4 +1,4 @@ -const char miscutil_rcs[] = "$Id: miscutil.c,v 1.74 2012/03/09 16:23:50 fabiankeil Exp $"; +const char miscutil_rcs[] = "$Id: miscutil.c,v 1.75 2012/03/09 16:24:36 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/miscutil.c,v $ @@ -213,7 +213,7 @@ int strcmpic(const char *s1, const char *s2) while (*s1 && *s2) { - if (( *s1 != *s2) && ( privoxy_tolower(*s1) != privoxy_tolower(*s2) ) ) + if ((*s1 != *s2) && (privoxy_tolower(*s1) != privoxy_tolower(*s2))) { break; } @@ -246,7 +246,7 @@ int strncmpic(const char *s1, const char *s2, size_t n) while (*s1 && *s2) { - if (( *s1 != *s2) && ( privoxy_tolower(*s1) != privoxy_tolower(*s2) ) ) + if ((*s1 != *s2) && (privoxy_tolower(*s1) != privoxy_tolower(*s2))) { break; } @@ -586,7 +586,7 @@ char * make_path(const char * dir, const char * file) #else /* ifndef _WIN32 || __OS2__ */ || (*file == '/') /* Absolute path (U*ix) */ #endif /* ifndef _WIN32 || __OS2__ */ - ) + ) { return strdup(file); } @@ -1374,7 +1374,7 @@ int portable_vsnprintf(char *str, size_t str_m, const char *fmt, va_list ap) { tmp[str_arg_l++] = space_for_positive ? ' ' : '+'; #endif } else if (alternate_form) { - if (arg_sign != 0 && (fmt_spec == 'x' || fmt_spec == 'X')) + if (arg_sign != 0 && (fmt_spec == 'x' || fmt_spec == 'X') ) { tmp[str_arg_l++] = '0'; tmp[str_arg_l++] = fmt_spec; } /* alternate form should have no effect for p conversion, but ... */ #ifdef HPUX_COMPATIBLE @@ -1385,7 +1385,7 @@ int portable_vsnprintf(char *str, size_t str_m, const char *fmt, va_list ap) { /* Actually it uses 0x prefix even for a zero value. */ && arg_sign != 0 #endif - ) { tmp[str_arg_l++] = '0'; tmp[str_arg_l++] = 'x'; } + ) { tmp[str_arg_l++] = '0'; tmp[str_arg_l++] = 'x'; } #endif } zero_padding_insertion_ind = str_arg_l; @@ -1397,7 +1397,7 @@ int portable_vsnprintf(char *str, size_t str_m, const char *fmt, va_list ap) { * converting a zero value with a precision of zero is a null string. * Actually HP returns all zeroes, and Linux returns "(nil)". */ #endif - ) { + ) { /* converted to null string */ /* When zero value is formatted with an explicit precision 0, the resulting formatted string is empty (d, i, u, o, x, X, p). */ @@ -1437,7 +1437,7 @@ int portable_vsnprintf(char *str, size_t str_m, const char *fmt, va_list ap) { if (zero_padding_insertion_ind+1 < str_arg_l && tmp[zero_padding_insertion_ind] == '0' && (tmp[zero_padding_insertion_ind+1] == 'x' || - tmp[zero_padding_insertion_ind+1] == 'X')) { + tmp[zero_padding_insertion_ind+1] == 'X') ) { zero_padding_insertion_ind += 2; } } @@ -1452,7 +1452,7 @@ int portable_vsnprintf(char *str, size_t str_m, const char *fmt, va_list ap) { && !(zero_padding_insertion_ind < str_arg_l && tmp[zero_padding_insertion_ind] == '0') #endif - ) { /* assure leading zero for alternate-form octal numbers */ + ) { /* assure leading zero for alternate-form octal numbers */ if (!precision_specified || precision < num_of_digits+1) { /* precision is increased to force the first character to be zero, except if a zero value is formatted with an explicit precision diff --git a/pcrs.c b/pcrs.c index 06481277..344d7550 100644 --- a/pcrs.c +++ b/pcrs.c @@ -1,4 +1,4 @@ -const char pcrs_rcs[] = "$Id: pcrs.c,v 1.38 2011/09/04 11:10:56 fabiankeil Exp $"; +const char pcrs_rcs[] = "$Id: pcrs.c,v 1.39 2012/03/09 16:23:50 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/pcrs.c,v $ @@ -882,7 +882,7 @@ int pcrs_execute(pcrs_job *job, const char *subject, size_t subject_length, char result_offset, subject + matches[i].submatch_offset[job->substitute->backref[k]], matches[i].submatch_length[job->substitute->backref[k]] - ); + ); result_offset += matches[i].submatch_length[job->substitute->backref[k]]; } } diff --git a/urlmatch.c b/urlmatch.c index c48fd385..3a9c8657 100644 --- a/urlmatch.c +++ b/urlmatch.c @@ -1,4 +1,4 @@ -const char urlmatch_rcs[] = "$Id: urlmatch.c,v 1.68 2012/03/09 16:23:50 fabiankeil Exp $"; +const char urlmatch_rcs[] = "$Id: urlmatch.c,v 1.69 2012/03/09 16:24:36 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/urlmatch.c,v $ @@ -253,8 +253,8 @@ jb_err parse_http_url(const char *url, struct http_request *http, int require_pr */ if (*http->url == '*') { - if (NULL == (http->path = strdup("*")) - || NULL == (http->hostport = strdup(""))) + if (NULL == (http->path = strdup("*")) + || NULL == (http->hostport = strdup(""))) { return JB_ERR_MEMORY; } @@ -338,7 +338,7 @@ jb_err parse_http_url(const char *url, struct http_request *http, int require_pr freez(buf); if ((http->path == NULL) - || (http->hostport == NULL)) + || (http->hostport == NULL)) { return JB_ERR_MEMORY; } @@ -579,7 +579,7 @@ jb_err parse_http_request(const char *req, struct http_request *http) freez(buf); - if ((http->cmd == NULL) + if ( (http->cmd == NULL) || (http->gpc == NULL) || (http->ver == NULL)) { @@ -972,8 +972,8 @@ static int simplematch(const char *pattern, const char *text) * Char match, or char range match? */ if ((*pat == *txt) - || (*pat == '?') - || ((*pat == ']') && (charmap[*txt / 8] & (1 << (*txt % 8))))) + || (*pat == '?') + || ((*pat == ']') && (charmap[*txt / 8] & (1 << (*txt % 8))))) { /* * Success: Go ahead @@ -1009,7 +1009,7 @@ static int simplematch(const char *pattern, const char *text) } /* Cut off extra '*'s */ - if (*pat == '*') pat++; + if (*pat == '*') pat++; /* If this is the pattern's end, fine! */ return(*pat); diff --git a/w32taskbar.c b/w32taskbar.c index 8f7b5ea0..27d45b4f 100644 --- a/w32taskbar.c +++ b/w32taskbar.c @@ -1,4 +1,4 @@ -const char w32taskbar_rcs[] = "$Id: w32taskbar.c,v 1.12 2011/09/04 11:10:56 fabiankeil Exp $"; +const char w32taskbar_rcs[] = "$Id: w32taskbar.c,v 1.13 2012/03/09 16:23:50 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/w32taskbar.c,v $ @@ -243,7 +243,7 @@ LRESULT CALLBACK TrayProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) GetCursorPos(&pt); SetForegroundWindow(g_hwndLogFrame); TrackPopupMenu(hmenu, TPM_LEFTALIGN | TPM_TOPALIGN, pt.x, pt.y, 0, g_hwndLogFrame, NULL); - PostMessage(g_hwndLogFrame, WM_NULL, 0, 0) ; + PostMessage(g_hwndLogFrame, WM_NULL, 0, 0); } else if (uMouseMsg == WM_LBUTTONDBLCLK) {