<p>if asprintf fails, string content becomes invalid. we need<br>
to check if it ran OK by checking the returned value.</p>

<p>in case of fail, asprintf returns -1, otherwise the number<br>
of writen bytes is returned.</p>

<p>also, on ubuntu 13.10 i've receiving a lot of warnings:</p>

<p>"warning: ignoring return value of ‘asprintf’"</p>

<p>this patches fixes some of them</p>

<h2>Signed-off-by: Ricardo Maraschini <a href="mailto:ricardo.maraschini@gmail.com">ricardo.maraschini@gmail.com</a>
</h2>

<p>Closes <a href="https://github.com/monitoring-plugins/monitoring-plugins/pull/1227" class="issue-link" title="Warning fixes">#1227</a></p>

<hr>

<h4>You can merge this Pull Request by running</h4>
<pre>  git pull https://github.com/waja/monitoring-plugins github1227</pre>
<p>Or view, comment on, or merge it at:</p>
<p>  <a href='https://github.com/monitoring-plugins/monitoring-plugins/pull/1278'>https://github.com/monitoring-plugins/monitoring-plugins/pull/1278</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>lib/utils_base.c: if asprintf fails, string is undefined</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/monitoring-plugins/monitoring-plugins/pull/1278/files#diff-0">lib/utils_base.c</a>
    (15)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/monitoring-plugins/monitoring-plugins/pull/1278.patch'>https://github.com/monitoring-plugins/monitoring-plugins/pull/1278.patch</a></li>
  <li><a href='https://github.com/monitoring-plugins/monitoring-plugins/pull/1278.diff'>https://github.com/monitoring-plugins/monitoring-plugins/pull/1278.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br><a href="https://github.com/monitoring-plugins/monitoring-plugins/pull/1278">Reply to this email on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/5514713__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcyMjM0Mzk2NCwiZGF0YSI6eyJpZCI6MzgzNjk2Nzd9fQ==--01548e0248b939748afdc2f5cd31a244fa9b3ec3.gif" width="1" /></p>