aboutsummaryrefslogtreecommitdiff
path: root/docs/examples/ghiper.c
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2007-07-12 21:11:10 +0000
committerDan Fandrich <dan@coneharvesters.com>2007-07-12 21:11:10 +0000
commit49ce3e5160a9576e797bf87cef012b09d1c54ecb (patch)
tree9b8e476de272cfd92bb3d857aa3c6eef273140b7 /docs/examples/ghiper.c
parent4a728747e6f8845e500910e397dfc99aaf4a7984 (diff)
Fixed some compile warnings and errors and improved portability in the
examples. Removed ftp3rdparty.c since libcurl doesn't support 3rd party FTP transfers any longer.
Diffstat (limited to 'docs/examples/ghiper.c')
-rw-r--r--docs/examples/ghiper.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/examples/ghiper.c b/docs/examples/ghiper.c
index cd0895b5f..db7d3cb1c 100644
--- a/docs/examples/ghiper.c
+++ b/docs/examples/ghiper.c
@@ -91,9 +91,9 @@ typedef struct _SockInfo {
/* Die if we get a bad CURLMcode somewhere */
-static void mcode_or_die(char *where, CURLMcode code) {
+static void mcode_or_die(const char *where, CURLMcode code) {
if ( CURLM_OK != code ) {
- char *s;
+ const char *s;
switch (code) {
case CURLM_CALL_MULTI_PERFORM: s="CURLM_CALL_MULTI_PERFORM"; break;
case CURLM_OK: s="CURLM_OK"; break;
@@ -259,7 +259,7 @@ static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp)
{
GlobalInfo *g = (GlobalInfo*) cbp;
SockInfo *fdp = (SockInfo*) sockp;
- char *whatstr[]={ "none", "IN", "OUT", "INOUT", "REMOVE" };
+ static const char *whatstr[]={ "none", "IN", "OUT", "INOUT", "REMOVE" };
MSG_OUT("socket callback: s=%d e=%p what=%s ", s, e, whatstr[what]);
if (what == CURL_POLL_REMOVE) {
@@ -402,7 +402,7 @@ static gboolean fifo_cb (GIOChannel *ch, GIOCondition condition, gpointer data)
int init_fifo(void)
{
struct stat st;
- char *fifo = "hiper.fifo";
+ const char *fifo = "hiper.fifo";
int socket;
if (lstat (fifo, &st) == 0) {