Skip to content

Commit

Permalink
Fix print of size_t using %Zu
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelCarpintero authored and AngelCarpintero committed Dec 3, 2009
1 parent 7dc98cf commit 4bca8c1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
18 changes: 9 additions & 9 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.64 for motion trunk-r474.
# Generated by GNU Autoconf 2.64 for motion trunk-r475.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
Expand Down Expand Up @@ -546,8 +546,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='motion'
PACKAGE_TARNAME='motion'
PACKAGE_VERSION='trunk-r474'
PACKAGE_STRING='motion trunk-r474'
PACKAGE_VERSION='trunk-r475'
PACKAGE_STRING='motion trunk-r475'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''

Expand Down Expand Up @@ -1210,7 +1210,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures motion trunk-r474 to adapt to many kinds of systems.
\`configure' configures motion trunk-r475 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
Expand Down Expand Up @@ -1271,7 +1271,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of motion trunk-r474:";;
short | recursive ) echo "Configuration of motion trunk-r475:";;
esac
cat <<\_ACEOF
Expand Down Expand Up @@ -1412,7 +1412,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
motion configure trunk-r474
motion configure trunk-r475
generated by GNU Autoconf 2.64
Copyright (C) 2009 Free Software Foundation, Inc.
Expand Down Expand Up @@ -2009,7 +2009,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by motion $as_me trunk-r474, which was
It was created by motion $as_me trunk-r475, which was
generated by GNU Autoconf 2.64. Invocation command line was
$ $0 $@
Expand Down Expand Up @@ -5790,7 +5790,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by motion $as_me trunk-r474, which was
This file was extended by motion $as_me trunk-r475, which was
generated by GNU Autoconf 2.64. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -5850,7 +5850,7 @@ Report bugs to the package provider."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
motion config.status trunk-r474
motion config.status trunk-r475
configured by $0, generated by GNU Autoconf 2.64,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Expand Down
2 changes: 1 addition & 1 deletion stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ static void* handle_md5_digest(void* param)
"Content-Type: text/html\r\n"
"Keep-Alive: timeout=%i\r\n"
"Connection: keep-alive\r\n"
"Content-Length: %li\r\n\r\n",
"Content-Length: %Zu\r\n\r\n",
request_auth_response_template, server_nonce,
KEEP_ALIVE_TIMEOUT, strlen(auth_failed_html_template));
ret = write(p->sock, buffer, strlen(buffer));
Expand Down
14 changes: 7 additions & 7 deletions webhttpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ static ssize_t read_nonblock(int fd ,void *buf, ssize_t size)
static void send_template_ini_client(int client_socket, const char *template)
{
ssize_t nwrite = 0;
nwrite = write_nonblock(client_socket, ok_response, strlen (ok_response));
nwrite = write_nonblock(client_socket, ok_response, strlen(ok_response));
nwrite += write_nonblock(client_socket, template, strlen(template));
if (nwrite != (ssize_t)(strlen(ok_response) + strlen(template)))
motion_log(LOG_ERR, 1, "%s: failure write", __FUNCTION__);
Expand All @@ -249,7 +249,7 @@ static void send_template_ini_client(int client_socket, const char *template)
static void send_template_ini_client_raw(int client_socket)
{
ssize_t nwrite = 0;
nwrite = write_nonblock(client_socket, ok_response_raw, strlen (ok_response_raw));
nwrite = write_nonblock(client_socket, ok_response_raw, strlen(ok_response_raw));
if (nwrite != (ssize_t)strlen(ok_response_raw))
motion_log(LOG_ERR, 1, "%s: failure write", __FUNCTION__);
}
Expand Down Expand Up @@ -719,7 +719,7 @@ static unsigned int config(char *pointer, char *res, unsigned int length_uri,
length_uri = length_uri - 6;
warningkill = sscanf(pointer, "%255[-0-9a-z_]", command);
/*check if command exist, length_uri too*/
length_uri = length_uri-strlen(command);
length_uri = length_uri - strlen(command);

if (length_uri == 0) {
const char *value = NULL;
Expand Down Expand Up @@ -2255,7 +2255,7 @@ static unsigned int read_client(int client_socket, void *userdata, char *auth)
snprintf(response, sizeof (response), bad_method_response_template, method);
else
snprintf(response, sizeof (response), bad_method_response_template_raw, method);
warningkill = write_nonblock(client_socket, response, strlen (response));
warningkill = write_nonblock(client_socket, response, strlen(response));
pthread_mutex_unlock(&httpd_mutex);
return 1;
}
Expand All @@ -2270,15 +2270,15 @@ static unsigned int read_client(int client_socket, void *userdata, char *auth)
} else {
char response[1024];
snprintf(response, sizeof (response), request_auth_response_template, method);
warningkill = write_nonblock(client_socket, response, strlen (response));
warningkill = write_nonblock(client_socket, response, strlen(response));
pthread_mutex_unlock(&httpd_mutex);
return 1;
}

if (strcmp(auth, authentication)) {
char response[1024] = {'\0'};
snprintf(response, sizeof (response), request_auth_response_template, method);
warningkill = write_nonblock(client_socket, response, strlen (response));
warningkill = write_nonblock(client_socket, response, strlen(response));
pthread_mutex_unlock(&httpd_mutex);
return 1;
} else {
Expand All @@ -2289,7 +2289,7 @@ static unsigned int read_client(int client_socket, void *userdata, char *auth)
// Request Authorization
char response[1024] = {'\0'};
snprintf(response, sizeof (response), request_auth_response_template, method);
warningkill = write_nonblock(client_socket, response, strlen (response));
warningkill = write_nonblock(client_socket, response, strlen(response));
pthread_mutex_unlock(&httpd_mutex);
return 1;
}
Expand Down

0 comments on commit 4bca8c1

Please sign in to comment.