1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

getinfo.c: fix enumerated type mixed with another type

This commit is contained in:
Yang Tse 2013-07-11 17:03:14 +02:00
parent c983aa9efc
commit 0d9e65f79f

View File

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -55,7 +55,7 @@ CURLcode Curl_initinfo(struct SessionHandle *data)
info->httpcode = 0; info->httpcode = 0;
info->httpversion = 0; info->httpversion = 0;
info->filetime = -1; /* -1 is an illegal time and thus means unknown */ info->filetime = -1; /* -1 is an illegal time and thus means unknown */
info->timecond=0; info->timecond = FALSE;
if(info->contenttype) if(info->contenttype)
free(info->contenttype); free(info->contenttype);
@ -186,7 +186,7 @@ static CURLcode getinfo_long(struct SessionHandle *data, CURLINFO info,
break; break;
case CURLINFO_CONDITION_UNMET: case CURLINFO_CONDITION_UNMET:
/* return if the condition prevented the document to get transferred */ /* return if the condition prevented the document to get transferred */
*param_longp = data->info.timecond; *param_longp = data->info.timecond ? 1L : 0L;
break; break;
case CURLINFO_RTSP_CLIENT_CSEQ: case CURLINFO_RTSP_CLIENT_CSEQ:
*param_longp = data->state.rtsp_next_client_CSeq; *param_longp = data->state.rtsp_next_client_CSeq;