r93223 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93222‎ | r93223 | r93224 >
Date:17:34, 26 July 2011
Author:platonides
Status:ok
Tags:
Comment:
Spaces to tabs
Modified paths:
  • /trunk/debs/squid/redirector.c (modified) (history)

Diff [purge]

Index: trunk/debs/squid/redirector.c
@@ -26,20 +26,20 @@
2727 };
2828
2929 int load_in_buff(char *buff, struct IN_BUFF *in_buff) {
30 - in_buff->url = strtok(buff, " ");
31 - in_buff->src_address = strtok(NULL, " ");
32 - in_buff->ident= strtok(NULL, " ");
33 - in_buff->method= strtok(NULL, " \n");;
 30+ in_buff->url = strtok(buff, " ");
 31+ in_buff->src_address = strtok(NULL, " ");
 32+ in_buff->ident= strtok(NULL, " ");
 33+ in_buff->method= strtok(NULL, " \n");;
 34+
 35+ if (!in_buff->src_address || !in_buff->ident || !in_buff->method) {
 36+ return 1;
 37+ }
3438
35 - if (!in_buff->src_address || !in_buff->ident || !in_buff->method) {
36 - return 1;
37 - }
38 -
39 - if(strlen(in_buff->url) <= 4) {
40 - return 1;
41 - }
 39+ if(strlen(in_buff->url) <= 4) {
 40+ return 1;
 41+ }
4242
43 - return 0;
 43+ return 0;
4444 }
4545
4646 int main(int argc, char **argv) {
@@ -66,7 +66,7 @@
6767 sprintf(replacement_url, replacement_url_pattern, command_line_url);
6868 }
6969
70 - /* make standard output line buffered */
 70+ /* make standard output line buffered */
7171 //setvbuf(stdout, NULL, _IOLBF, 0);
7272
7373 re = pcre_compile(

Status & tagging log