A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://github.com/openresty/memc-nginx-module/commit/31865d0ca4031d024a11ba4cac5de2f63eccb6d6 below:

fixed coding style issues found by ngx-releng. · openresty/memc-nginx-module@31865d0 · GitHub

@@ -15,99 +15,100 @@ ngx_http_memc_cmd_t

15 15

ngx_http_memc_parse_cmd(u_char *data, size_t len, ngx_flag_t *is_storage_cmd)

16 16

{

17 17

switch (len) {

18 -

case 3:

19 -

if (ngx_http_memc_strcmp_const(data, "set") == 0) {

20 -

*is_storage_cmd = 1;

21 -

return ngx_http_memc_cmd_set;

22 -

}

23 - 24 -

if (ngx_http_memc_strcmp_const(data, "add") == 0) {

25 -

*is_storage_cmd = 1;

26 -

return ngx_http_memc_cmd_add;

27 -

}

28 - 29 -

/*

30 -

if (ngx_str3cmp(data, 'c', 'a', 's')) {

31 -

*is_storage_cmd = 1;

32 -

return ngx_http_memc_cmd_cas;

33 -

}

34 -

*/

35 - 36 -

if (ngx_http_memc_strcmp_const(data, "get") == 0) {

37 -

return ngx_http_memc_cmd_get;

38 -

}

39 - 40 -

break;

41 - 42 -

case 4:

43 -

/*

44 -

if (ngx_str4cmp(data, 'g', 'e', 't', 's')) {

45 -

return ngx_http_memc_cmd_gets;

46 -

}

47 -

*/

48 - 49 -

if (ngx_http_memc_strcmp_const(data, "incr") == 0) {

50 -

return ngx_http_memc_cmd_incr;

51 -

}

52 - 53 -

if (ngx_http_memc_strcmp_const(data, "decr") == 0) {

54 -

return ngx_http_memc_cmd_decr;

55 -

}

56 - 57 -

break;

58 - 59 -

case 5:

60 -

if (ngx_http_memc_strcmp_const(data, "stats") == 0) {

61 -

return ngx_http_memc_cmd_stats;

62 -

}

63 - 64 -

break;

65 - 66 -

case 6:

67 -

if (ngx_http_memc_strcmp_const(data, "append") == 0) {

68 -

*is_storage_cmd = 1;

69 -

return ngx_http_memc_cmd_append;

70 -

}

71 - 72 -

if (ngx_http_memc_strcmp_const(data, "delete") == 0) {

73 -

return ngx_http_memc_cmd_delete;

74 -

}

75 - 76 -

break;

77 - 78 -

case 7:

79 -

if (ngx_http_memc_strcmp_const(data, "replace") == 0) {

80 -

*is_storage_cmd = 1;

81 -

return ngx_http_memc_cmd_replace;

82 -

}

83 - 84 -

if (ngx_http_memc_strcmp_const(data, "prepend") == 0) {

85 -

*is_storage_cmd = 1;

86 -

return ngx_http_memc_cmd_prepend;

87 -

}

88 - 89 -

if (ngx_http_memc_strcmp_const(data, "version") == 0) {

90 -

return ngx_http_memc_cmd_version;

91 -

}

92 - 93 -

break;

94 - 95 -

case 9:

96 -

if (ngx_http_memc_strcmp_const(data, "flush_all") == 0) {

97 -

return ngx_http_memc_cmd_flush_all;

98 -

}

99 - 100 -

/*

101 -

if (ngx_str9cmp(data, 'v', 'e', 'r', 'b', 'o', 's', 'i', 't', 'y'))

102 -

{

103 -

return ngx_http_memc_cmd_verbosity;

104 -

}

105 -

*/

106 - 107 -

break;

108 - 109 -

default:

110 -

break;

18 + 19 +

case 3:

20 +

if (ngx_http_memc_strcmp_const(data, "set") == 0) {

21 +

*is_storage_cmd = 1;

22 +

return ngx_http_memc_cmd_set;

23 +

}

24 + 25 +

if (ngx_http_memc_strcmp_const(data, "add") == 0) {

26 +

*is_storage_cmd = 1;

27 +

return ngx_http_memc_cmd_add;

28 +

}

29 + 30 +

/*

31 +

if (ngx_str3cmp(data, 'c', 'a', 's')) {

32 +

*is_storage_cmd = 1;

33 +

return ngx_http_memc_cmd_cas;

34 +

}

35 +

*/

36 + 37 +

if (ngx_http_memc_strcmp_const(data, "get") == 0) {

38 +

return ngx_http_memc_cmd_get;

39 +

}

40 + 41 +

break;

42 + 43 +

case 4:

44 +

/*

45 +

if (ngx_str4cmp(data, 'g', 'e', 't', 's')) {

46 +

return ngx_http_memc_cmd_gets;

47 +

}

48 +

*/

49 + 50 +

if (ngx_http_memc_strcmp_const(data, "incr") == 0) {

51 +

return ngx_http_memc_cmd_incr;

52 +

}

53 + 54 +

if (ngx_http_memc_strcmp_const(data, "decr") == 0) {

55 +

return ngx_http_memc_cmd_decr;

56 +

}

57 + 58 +

break;

59 + 60 +

case 5:

61 +

if (ngx_http_memc_strcmp_const(data, "stats") == 0) {

62 +

return ngx_http_memc_cmd_stats;

63 +

}

64 + 65 +

break;

66 + 67 +

case 6:

68 +

if (ngx_http_memc_strcmp_const(data, "append") == 0) {

69 +

*is_storage_cmd = 1;

70 +

return ngx_http_memc_cmd_append;

71 +

}

72 + 73 +

if (ngx_http_memc_strcmp_const(data, "delete") == 0) {

74 +

return ngx_http_memc_cmd_delete;

75 +

}

76 + 77 +

break;

78 + 79 +

case 7:

80 +

if (ngx_http_memc_strcmp_const(data, "replace") == 0) {

81 +

*is_storage_cmd = 1;

82 +

return ngx_http_memc_cmd_replace;

83 +

}

84 + 85 +

if (ngx_http_memc_strcmp_const(data, "prepend") == 0) {

86 +

*is_storage_cmd = 1;

87 +

return ngx_http_memc_cmd_prepend;

88 +

}

89 + 90 +

if (ngx_http_memc_strcmp_const(data, "version") == 0) {

91 +

return ngx_http_memc_cmd_version;

92 +

}

93 + 94 +

break;

95 + 96 +

case 9:

97 +

if (ngx_http_memc_strcmp_const(data, "flush_all") == 0) {

98 +

return ngx_http_memc_cmd_flush_all;

99 +

}

100 + 101 +

/*

102 +

if (ngx_str9cmp(data, 'v', 'e', 'r', 'b', 'o', 's', 'i', 't', 'y'))

103 +

{

104 +

return ngx_http_memc_cmd_verbosity;

105 +

}

106 +

*/

107 + 108 +

break;

109 + 110 +

default:

111 +

break;

111 112

}

112 113 113 114

return ngx_http_memc_cmd_unknown;

@@ -129,15 +130,15 @@ ngx_http_memc_upstream_add(ngx_http_request_t *r, ngx_url_t *url)

129 130 130 131

if (uscfp[i]->host.len != url->host.len

131 132

|| ngx_strncasecmp(uscfp[i]->host.data, url->host.data,

132 -

url->host.len) != 0)

133 +

url->host.len) != 0)

133 134

{

134 135

dd("upstream_add: host not match");

135 136

continue;

136 137

}

137 138 138 139

if (uscfp[i]->port != url->port) {

139 140

dd("upstream_add: port not match: %d != %d",

140 -

(int) uscfp[i]->port, (int) url->port);

141 +

(int) uscfp[i]->port, (int) url->port);

141 142

continue;

142 143

}

143 144

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4