comparison src/DLD-FUNCTIONS/urlwrite.cc @ 10084:81e88250bf42

urlwrite: avoid using errno as a local variable
author John W. Eaton <jwe@octave.org>
date Mon, 11 Jan 2010 16:07:15 -0500
parents 2cd940306a06
children 40dfc0c99116
comparison
equal deleted inserted replaced
10083:614ad9e7a17b 10084:81e88250bf42
249 return rep->is_valid (); 249 return rep->is_valid ();
250 } 250 }
251 251
252 std::string lasterror (void) const 252 std::string lasterror (void) const
253 { 253 {
254 CURLcode errno; 254 CURLcode errnum;
255 255
256 curl_easy_getinfo (rep->handle(), CURLINFO_OS_ERRNO, &errno); 256 curl_easy_getinfo (rep->handle(), CURLINFO_OS_ERRNO, &errnum);
257 257
258 return std::string (curl_easy_strerror (errno)); 258 return std::string (curl_easy_strerror (errnum));
259 } 259 }
260 260
261 void set_ostream (std::ostream& os) const 261 void set_ostream (std::ostream& os) const
262 { 262 {
263 setopt (CURLOPT_WRITEDATA, static_cast<void*> (&os)); 263 setopt (CURLOPT_WRITEDATA, static_cast<void*> (&os));