Revision: 1112
Author: [email protected]
Date: Mon Mar 8 01:47:15 2010
Log: Avoid returning 0 from output_str() when successfully writing an empty
string.
The correct return value is 1, for the 1 octet used for the tag.
http://code.google.com/p/perl-devel-nytprof/source/detail?r=1112
Modified:
/trunk/NYTProf.xs
=======================================
--- /trunk/NYTProf.xs Mon Mar 8 01:47:10 2010
+++ /trunk/NYTProf.xs Mon Mar 8 01:47:15 2010
@@ -485,9 +485,11 @@
if (retval <= 0)
return retval;
- total += retval = NYTP_write(file, str, len);
- if (retval <= 0)
- return retval;
+ if (len) {
+ total += retval = NYTP_write(file, str, len);
+ if (retval <= 0)
+ return retval;
+ }
return total;
}
--
You've received this message because you are subscribed to
the Devel::NYTProf Development User group.
Group hosted at: http://groups.google.com/group/develnytprof-dev
Project hosted at: http://perl-devel-nytprof.googlecode.com
CPAN distribution: http://search.cpan.org/dist/Devel-NYTProf
To post, email: [email protected]
To unsubscribe, email: [email protected]