title: How to update a vargs to send to printf
body: <p>I have the following code where I format a message that has been passed via a logger:</p>
  <pre><code>va_list args;
  va_start(args, level);
  
  // pop the msg and do some string replaces
  char *msg    = va_arg(args, char*);
  ssize_t len  = str_replace(tmp, &quot;%(msg)s&quot;, msg, output, 1024);
  
  // now how to get it 'back in' so I can print it?'
  // msg = output
  
  vfprintf(stderr, output, args);
  </code></pre>
  <p>The above code prints nothing, as it seems to have 'popped' the <code>msg</code> without me placing the updated msg back in there. What would be a possible way to do this?</p>