<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[Snooda]]></title> 
<link>http://www.snooda.com/index</link> 
<description><![CDATA[Snooda's Blog]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[Snooda]]></copyright>
<item>
<link>http://www.snooda.com/read/</link>
<title><![CDATA[printf空指针NULL的问题]]></title> 
<author>snooda &lt;admin@snooda.com&gt;</author>
<category><![CDATA[c程序设计]]></category>
<pubDate>Wed, 16 May 2012 09:52:37 +0000</pubDate> 
<guid>http://www.snooda.com/read/</guid> 
<description>
<![CDATA[ 
	&nbsp;&nbsp;&nbsp;&nbsp;今天发现程序中有几个地方在没有校验指针为NULL的时候进行了打印日志操作，在字符串处理函数中使用NULL指针不是什么好事，研究了一下，发现在一些的linux发行版中，printf("%s",NULL)会打印一个“（NULL）”，而在solaris中则会出core，windows下也没有问题。<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;可见不同的c库对于这个行为的实现不太一致。<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;使用中还是要尽量避免这种用法，不过每次打日志前都要判断指针情况确实比较恶。<br/><br/><br/><br/><br/>
]]>
</description>
</item><item>
<link>http://www.snooda.com/read/#blogcomment</link>
<title><![CDATA[[评论] printf空指针NULL的问题]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.snooda.com/read/#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>