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.

> +}

-- 
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
"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