}
if(0 == what) {
CURL_TRC_CF(data, cf, "Curl_socket_check: %s would block",
- wants_read&&wants_write ? "writing and reading" :
+ wants_read && wants_write ? "writing and reading" :
wants_write ? "writing" : "reading");
if(wants_write)
connssl->io_need |= CURL_SSL_IO_NEED_SEND;
'LONGLINE' => "Line longer than $max_column",
'SPACEBEFORELABEL' => 'labels not at the start of the line',
'MULTISPACE' => 'multiple spaces used when not suitable',
+ 'NOSPACEAND' => 'missing space around Logical AND operator',
'NOSPACEC' => 'missing space around ternary colon operator',
'NOSPACEEQUALS' => 'equals sign without preceding space',
'NOSPACEQ' => 'missing space around ternary question mark operator',
"space after open parenthesis");
}
+ # check spaces before Logical AND operator
+ if($nostr =~ /^(.*)\w&&/i) {
+ checkwarn("NOSPACEAND",
+ $line, length($1)+1, $file, $l,
+ "missing space before Logical AND");
+ }
+
+ # check spaces after Logical AND operator
+ if($nostr =~ /^(.*&&)\w/i) {
+ checkwarn("NOSPACEAND",
+ $line, length($1), $file, $l,
+ "missing space after Logical AND");
+ }
+
# check spaces before colon
if($nostr =~ /^(.*[^']\?[^'].*)(\w|\)|\]|')\:/i) {
my $m = $1;