|
From: <sv...@va...> - 2014-09-01 21:04:03
|
Author: florian
Date: Mon Sep 1 21:03:54 2014
New Revision: 14413
Log:
Followup to r13469. lineno has already been asserted to be != NULL.
No need to check it again.
Modified:
trunk/coregrind/m_errormgr.c
trunk/include/pub_tool_errormgr.h
Modified: trunk/coregrind/m_errormgr.c
==============================================================================
--- trunk/coregrind/m_errormgr.c (original)
+++ trunk/coregrind/m_errormgr.c Mon Sep 1 21:03:54 2014
@@ -1119,7 +1119,7 @@
while (True) {
n = get_char(fd, &ch);
if (n == 1 && !VG_(isspace)(ch)) break;
- if (n == 1 && ch == '\n' && lineno)
+ if (n == 1 && ch == '\n')
(*lineno)++;
if (n <= 0) return True;
}
@@ -1130,7 +1130,7 @@
while (True) {
n = get_char(fd, &ch);
if (n <= 0) return False; /* the next call will return True */
- if (ch == '\n' && lineno)
+ if (ch == '\n')
(*lineno)++;
if (ch == '\n') break;
if (i > 0 && i == nBuf-1) {
Modified: trunk/include/pub_tool_errormgr.h
==============================================================================
--- trunk/include/pub_tool_errormgr.h (original)
+++ trunk/include/pub_tool_errormgr.h Mon Sep 1 21:03:54 2014
@@ -101,8 +101,8 @@
small for the line, it will be realloc'd until big enough (updating
*bufpp and *nBufp in the process). (It will bomb out if the size
gets ridiculous). Skips leading spaces on the line. Increments
- *lineno with the number of lines read if lineno is non-NULL. Returns
- True if no extra information line could be read. */
+ *lineno with the number of lines read. Returns True if no extra
+ information line could be read. */
extern Bool VG_(get_line) ( Int fd, HChar** bufpp, SizeT* nBufp, Int* lineno );
|