On Mon, 12 May 2014 17:03:29 +0200
<[email protected]> wrote:

> Hi!
> > +FILE *safe_popen(const char *file, const int lineno, void
> > (cleanup_fn)(void),
> > +            const char *command, const char *type)
> > +{
> > +   FILE *stream;
> > +   const int saved_errno = errno;
> > +
> > +   errno = 0;
> > +   stream = popen(command, type);
> > +
> > +   if (stream == NULL) {
> > +           if (errno != 0) {
> > +                   tst_brkm(TBROK | TERRNO, cleanup_fn,
> > +                            "%s:%d: popen(%s,%s) failed",
> > +                            file, lineno, command, type);
> > +           } else {
> > +                   tst_brkm(TBROK, cleanup_fn,
> > +                            "%s:%d: popen(%s,%s) failed: Out
> > of memory",
> > +                            file, lineno, command, type);
> > +           }
> > +   }
> > +
> > +   errno = saved_errno;
> 
> I've added missing return stream; here and pushed both patches,
> thanks.

Whoa, did I really miss that? Wondering how my test could have
run... Must have used the wrong version of the code when testing or
something.

But thanks for the merge!

Now you know why I really liked forcing people into using
-Werror ;-) Could it be a good idea to actually use -Werror by default,
and having a "production" flag for those who don't want it? Just to
ensure that lazy people are those being best looked after...


Regards
Mats Liljegren

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to