[llvm-commits] [llvm-gcc-4.2] r96947 - /llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
Duncan Sands
baldrick at free.fr
Tue Feb 23 07:07:27 PST 2010
Author: baldrick
Date: Tue Feb 23 09:07:27 2010
New Revision: 96947
URL: http://llvm.org/viewvc/llvm-project?rev=96947&view=rev
Log:
Port dragonegg commit 96946 (baldrick):
This is not a pointer, it's a character. Noticed by recent gcc.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp?rev=96947&r1=96946&r2=96947&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp Tue Feb 23 09:07:27 2010
@@ -245,7 +245,7 @@
// copy first.
char *StrPtr = FunctionNames.Allocate<char>(FnName.size() + 1);
strncpy(StrPtr, FnName.data(), FnName.size());
- StrPtr[FnName.size()] = NULL;
+ StrPtr[FnName.size()] = 0;
return StringRef(StrPtr);
}
More information about the llvm-commits
mailing list