(filename, clean_lines, linenum, error)
Check NULL usage.

  Args:
    filename: The name of the current file.
    clean_lines: A CleansedLines instance containing the file.
    linenum: The number of the line to check.
    error: The function to call with any errors found.
Check NULL usage.
Check NULL usage .
def CheckNullTokens(filename, clean_lines, linenum, error):
  """Check NULL usage.

  Args:
    filename: The name of the current file.
    clean_lines: A CleansedLines instance containing the file.
    linenum: The number of the line to check.
    error: The function to call with any errors found.
  """
  line = clean_lines.elided[linenum]

  # Avoid preprocessor lines
  if Match(r'^\s*#', line):
    return

  if line.find('/*') >= 0 or line.find('*/') >= 0:
    return

  for match in _NULL_TOKEN_PATTERN.finditer(line):
    error(filename, linenum, 'readability/null_usage', 2,
          'Use nullptr instead of NULL')
def CheckNullTokens ( filename , clean_lines , linenum , error ) : line = clean_lines . elided [ linenum ] # Avoid preprocessor lines if Match ( r'^\s*#' , line ) : return if line . find ( '/*' ) >= 0 or line . find ( '*/' ) >= 0 : return for match in _NULL_TOKEN_PATTERN . finditer ( line ) : error ( filename , linenum , 'readability/null_usage' , 2 , 'Use nullptr instead of NULL' )