rse 99/10/01 09:18:41
Modified: src/lib/apr/file_io/unix dir.c fileacc.c
src/lib/apr/include apr_general.h
src/lib/apr/lib apr_cpystrn.c apr_md5.c apr_pools.c
apr_slack.c
src/lib/apr/locks/unix crossproc.c
src/lib/apr/network_io/unix networkio.h poll.c sockets.c
sockopt.c
src/lib/apr/threadproc/unix proc.c signals.c
src/lib/apr/time/unix access.c
Log:
Ok, today it bored me too much that APR shouts many pages with warnings under
--with-option=devel (which has maximum -W's enabled which are still practical
for Apache), so I investiged an hour and did a quick cleanup of the APR
sources.
Please guys, if you're using gcc, please _always_ at least use -Wall for
compiling Apache. You will be surprised how much mistakes it catches easily. I
don't want to say you have to use the maximum -W approach I personally prefer,
but Apache's sources should always at least pass -Wall silently, I think.
Thanks.
Revision Changes Path
1.3 +5 -5 apache-2.0/src/lib/apr/file_io/unix/dir.c
Index: dir.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/unix/dir.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- dir.c 1999/09/03 12:22:27 1.2
+++ dir.c 1999/10/01 16:18:28 1.3
@@ -63,7 +63,7 @@
#include "apr_lib.h"
#include "apr_portable.h"
-ap_status_t dir_cleanup(void *thedir)
+static ap_status_t dir_cleanup(void *thedir)
{
struct dir_t *dir = thedir;
if (closedir(dir->dirstruct) == 0) {
@@ -208,24 +208,24 @@
* arg 1) the currently open directory.
* arg 2) the last modified time of the directory entry.
*/
-ap_status_t ap_dir_entry_mtime(struct dir_t *thedir, time_t *time)
+ap_status_t ap_dir_entry_mtime(struct dir_t *thedir, time_t *mtime)
{
struct stat filestat;
char *fname = NULL;
if (thedir->entry == NULL) {
- *time = -1;
+ *mtime = -1;
return APR_ENOFILE;
}
fname = ap_pstrcat(thedir->cntxt, thedir->dirname, "/",
thedir->entry->d_name, NULL);
if (stat(fname, &filestat) == -1) {
- *time = -1;
+ *mtime = -1;
return APR_ENOSTAT;
}
- *time = filestat.st_mtime;
+ *mtime = filestat.st_mtime;
return APR_SUCCESS;
}
1.5 +9 -9 apache-2.0/src/lib/apr/file_io/unix/fileacc.c
Index: fileacc.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/unix/fileacc.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- fileacc.c 1999/09/20 21:34:20 1.4
+++ fileacc.c 1999/10/01 16:18:28 1.5
@@ -157,17 +157,17 @@
* arg 1) The currently open file.
* arg 2) The last access time of the file.
*/
-ap_status_t ap_get_fileatime(struct file_t *file, time_t *time)
+ap_status_t ap_get_fileatime(struct file_t *file, time_t *atime)
{
if (file != NULL) {
if (!file->stated) {
ap_getfileinfo(file);
}
- *time = file->atime;
+ *atime = file->atime;
return APR_SUCCESS;
}
else {
- *time = -1;
+ *atime = -1;
return APR_ENOFILE;
}
}
@@ -178,17 +178,17 @@
* arg 1) The currently open file.
* arg 2) The last change time of the file.
*/
-ap_status_t ap_get_filectime(struct file_t *file, time_t *time)
+ap_status_t ap_get_filectime(struct file_t *file, time_t *ptime)
{
if (file != NULL) {
if (!file->stated) {
ap_getfileinfo(file);
}
- *time = file->ctime;
+ *ptime = file->ctime;
return APR_SUCCESS;
}
else {
- *time = -1;
+ *ptime = -1;
return APR_ENOFILE;
}
}
@@ -199,17 +199,17 @@
* arg 1) The currently open file.
* arg 2) The last modified time of the file.
*/
-ap_status_t ap_get_filemtime(struct file_t *file, time_t *time)
+ap_status_t ap_get_filemtime(struct file_t *file, time_t *mtime)
{
if (file != NULL) {
if (!file->stated) {
ap_getfileinfo(file);
}
- *time = file->mtime;
+ *mtime = file->mtime;
return APR_SUCCESS;
}
else {
- *time = -1;
+ *mtime = -1;
return APR_ENOFILE;
}
}
1.4 +5 -1 apache-2.0/src/lib/apr/include/apr_general.h
Index: apr_general.h
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_general.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- apr_general.h 1999/09/14 13:37:21 1.3
+++ apr_general.h 1999/10/01 16:18:30 1.4
@@ -217,12 +217,16 @@
#ifdef WIN32
#define APR_INLINE __inline
+#elif defined(__GNUC__) && defined(__GNUC__) && \
+ __GNUC__ >= 2 && __GNUC_MINOR__ >= 7
+#define APR_INLINE __inline__
#else
-#define APR_INLINE inline
+#define APR_INLINE /*nop*/
#endif
/* Context functions */
ap_status_t ap_create_context(ap_context_t *, ap_context_t **);
+ap_status_t ap_destroy_context(struct context_t *cont);
ap_status_t ap_exit(ap_context_t *);
ap_status_t ap_set_userdata(ap_context_t *, void *, char *,
ap_status_t (*cleanup) (void *));
1.3 +1 -0 apache-2.0/src/lib/apr/lib/apr_cpystrn.c
Index: apr_cpystrn.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/lib/apr_cpystrn.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- apr_cpystrn.c 1999/08/31 05:32:33 1.2
+++ apr_cpystrn.c 1999/10/01 16:18:32 1.3
@@ -59,6 +59,7 @@
#else
#include "apr_win.h"
#endif
+#include "apr_lib.h"
#if HAVE_SYS_TYPES_H
#include <sys/types.h>
1.3 +11 -11 apache-2.0/src/lib/apr/lib/apr_md5.c
Index: apr_md5.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/lib/apr_md5.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- apr_md5.c 1999/08/31 05:32:35 1.2
+++ apr_md5.c 1999/10/01 16:18:32 1.3
@@ -476,25 +476,25 @@
/*
* The password first, since that is what is most unknown
*/
- ap_MD5Update(&ctx, pw, strlen(pw));
+ ap_MD5Update(&ctx, (unsigned char *)pw, strlen(pw));
/*
* Then our magic string
*/
- ap_MD5Update(&ctx, apr1_id, strlen(apr1_id));
+ ap_MD5Update(&ctx, (unsigned char *)apr1_id, strlen(apr1_id));
/*
* Then the raw salt
*/
- ap_MD5Update(&ctx, sp, sl);
+ ap_MD5Update(&ctx, (unsigned char *)sp, sl);
/*
* Then just as many characters of the MD5(pw, salt, pw)
*/
ap_MD5Init(&ctx1);
- ap_MD5Update(&ctx1, pw, strlen(pw));
- ap_MD5Update(&ctx1, sp, sl);
- ap_MD5Update(&ctx1, pw, strlen(pw));
+ ap_MD5Update(&ctx1, (unsigned char *)pw, strlen(pw));
+ ap_MD5Update(&ctx1, (unsigned char *)sp, sl);
+ ap_MD5Update(&ctx1, (unsigned char *)pw, strlen(pw));
ap_MD5Final(final, &ctx1);
for(pl = strlen(pw); pl > 0; pl -= 16) {
ap_MD5Update(&ctx, final, (pl > 16) ? 16 : pl);
@@ -513,7 +513,7 @@
ap_MD5Update(&ctx, final, 1);
}
else {
- ap_MD5Update(&ctx, pw, 1);
+ ap_MD5Update(&ctx, (unsigned char *)pw, 1);
}
}
@@ -535,24 +535,24 @@
for (i = 0; i < 1000; i++) {
ap_MD5Init(&ctx1);
if (i & 1) {
- ap_MD5Update(&ctx1, pw, strlen(pw));
+ ap_MD5Update(&ctx1, (unsigned char *)pw, strlen(pw));
}
else {
ap_MD5Update(&ctx1, final, 16);
}
if (i % 3) {
- ap_MD5Update(&ctx1, sp, sl);
+ ap_MD5Update(&ctx1, (unsigned char *)sp, sl);
}
if (i % 7) {
- ap_MD5Update(&ctx1, pw, strlen(pw));
+ ap_MD5Update(&ctx1, (unsigned char *)pw, strlen(pw));
}
if (i & 1) {
ap_MD5Update(&ctx1, final, 16);
}
else {
- ap_MD5Update(&ctx1, pw, strlen(pw));
+ ap_MD5Update(&ctx1, (unsigned char *)pw, strlen(pw));
}
ap_MD5Final(final,&ctx1);
}
1.12 +1 -1 apache-2.0/src/lib/apr/lib/apr_pools.c
Index: apr_pools.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/lib/apr_pools.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- apr_pools.c 1999/09/20 22:18:49 1.11
+++ apr_pools.c 1999/10/01 16:18:32 1.12
@@ -552,7 +552,7 @@
void ap_destroy_real_pool(ap_pool_t *);
-void ap_clear_real_pool(ap_pool_t *a)
+static void ap_clear_real_pool(ap_pool_t *a)
{
ap_block_alarms();
1.3 +2 -0 apache-2.0/src/lib/apr/lib/apr_slack.c
Index: apr_slack.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/lib/apr_slack.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- apr_slack.c 1999/08/31 05:32:36 1.2
+++ apr_slack.c 1999/10/01 16:18:32 1.3
@@ -73,6 +73,8 @@
#include "http_log.h"
#endif
+#include "apr_lib.h"
+
#ifndef NO_SLACK
int ap_slack(int fd, int line)
{
1.4 +1 -1 apache-2.0/src/lib/apr/locks/unix/crossproc.c
Index: crossproc.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/locks/unix/crossproc.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- crossproc.c 1999/09/12 11:09:47 1.3
+++ crossproc.c 1999/10/01 16:18:34 1.4
@@ -230,7 +230,7 @@
#elif defined (USE_FCNTL_SERIALIZE)
-ap_status_t lock_cleanup(void *lock_)
+static ap_status_t lock_cleanup(void *lock_)
{
struct lock_t *lock=lock_;
1.4 +1 -0 apache-2.0/src/lib/apr/network_io/unix/networkio.h
Index: networkio.h
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/unix/networkio.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- networkio.h 1999/09/03 14:20:23 1.3
+++ networkio.h 1999/10/01 16:18:34 1.4
@@ -88,6 +88,7 @@
};
ap_int16_t get_event(ap_int16_t);
+ap_int16_t get_revent(ap_int16_t);
#endif /* ! NETWORK_IO_H */
1.6 +1 -2 apache-2.0/src/lib/apr/network_io/unix/poll.c
Index: poll.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/unix/poll.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- poll.c 1999/09/20 21:34:27 1.5
+++ poll.c 1999/10/01 16:18:34 1.6
@@ -276,10 +276,9 @@
if (aprset->events[i] & newevents) {
aprset->events[i] ^= newevents;
}
-
- return APR_SUCCESS;
i++;
}
+ return APR_SUCCESS;
}
#else /* Use select to mimic poll */
1.9 +7 -7 apache-2.0/src/lib/apr/network_io/unix/sockets.c
Index: sockets.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/unix/sockets.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- sockets.c 1999/09/18 11:48:16 1.8
+++ sockets.c 1999/10/01 16:18:35 1.9
@@ -66,7 +66,7 @@
#include <arpa/inet.h>
#include <netdb.h>
-ap_status_t socket_cleanup(void *sock)
+static ap_status_t socket_cleanup(void *sock)
{
struct socket_t *thesocket = sock;
if (close(thesocket->socketdes) == 0) {
@@ -327,10 +327,10 @@
* arg 1) The currently open socket.
* arg 2) The user data associated with the socket.
*/
-ap_status_t ap_get_socketdata(struct socket_t *socket, char *key, void *data)
+ap_status_t ap_get_socketdata(struct socket_t *sock, char *key, void *data)
{
- if (socket != NULL) {
- return ap_get_userdata(socket->cntxt, key, &data);
+ if (sock != NULL) {
+ return ap_get_userdata(sock->cntxt, key, &data);
}
else {
data = NULL;
@@ -345,11 +345,11 @@
* arg 1) The currently open socket.
* arg 2) The user data to associate with the socket.
*/
-ap_status_t ap_set_socketdata(struct socket_t *socket, void *data, char *key,
+ap_status_t ap_set_socketdata(struct socket_t *sock, void *data, char *key,
ap_status_t (*cleanup) (void *))
{
- if (socket != NULL) {
- return ap_set_userdata(socket->cntxt, data, key, cleanup);
+ if (sock != NULL) {
+ return ap_set_userdata(sock->cntxt, data, key, cleanup);
}
else {
data = NULL;
1.4 +3 -3 apache-2.0/src/lib/apr/network_io/unix/sockopt.c
Index: sockopt.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/unix/sockopt.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- sockopt.c 1999/09/04 00:21:16 1.3
+++ sockopt.c 1999/10/01 16:18:35 1.4
@@ -65,7 +65,7 @@
#include <unistd.h>
#include <fcntl.h>
-ap_status_t soblock(int sd)
+static ap_status_t soblock(int sd)
{
int fd_flags;
@@ -86,7 +86,7 @@
return APR_SUCCESS;
}
-ap_status_t sononblock(int sd)
+static ap_status_t sononblock(int sd)
{
int fd_flags;
@@ -95,7 +95,7 @@
fd_flags |= O_NONBLOCK;
#elif defined(O_NDELAY)
fd_flags |= O_NDELAY;
-#eli f defined(FNDELAY)
+#elif defined(FNDELAY)
fd_flags |= O_FNDELAY;
#else
/* XXXX: this breaks things, but an alternative isn't obvious...*/
1.3 +14 -14 apache-2.0/src/lib/apr/threadproc/unix/proc.c
Index: proc.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/unix/proc.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- proc.c 1999/08/31 05:32:53 1.2
+++ proc.c 1999/10/01 16:18:37 1.3
@@ -105,23 +105,23 @@
ap_status_t ap_setprocattr_io(struct procattr_t *attr, ap_int32_t in,
ap_int32_t out, ap_int32_t err)
{
- ap_status_t stat;
+ ap_status_t status;
if (in) {
- if ((stat = ap_create_pipe(attr->cntxt, &attr->child_in,
+ if ((status = ap_create_pipe(attr->cntxt, &attr->child_in,
&attr->parent_in)) != APR_SUCCESS) {
- return stat;
+ return status;
}
}
if (out) {
- if ((stat = ap_create_pipe(attr->cntxt, &attr->parent_out,
+ if ((status = ap_create_pipe(attr->cntxt, &attr->parent_out,
&attr->child_out)) != APR_SUCCESS) {
- return stat;
+ return status;
}
}
if (err) {
- if ((stat = ap_create_pipe(attr->cntxt, &attr->parent_err,
+ if ((status = ap_create_pipe(attr->cntxt, &attr->parent_err,
&attr->child_err)) != APR_SUCCESS) {
- return stat;
+ return status;
}
}
return APR_SUCCESS;
@@ -349,24 +349,24 @@
* APR_CHILD_NOTDONE -- child is still running.
*/
ap_status_t ap_wait_proc(struct proc_t *proc,
- ap_wait_how_e wait)
+ ap_wait_how_e waithow)
{
- pid_t stat;
+ pid_t status;
if (!proc)
return APR_ENOPROC;
- if (wait == APR_WAIT) {
- if ((stat = waitpid(proc->pid, NULL, WUNTRACED)) > 0) {
+ if (waithow == APR_WAIT) {
+ if ((status = waitpid(proc->pid, NULL, WUNTRACED)) > 0) {
return APR_CHILD_DONE;
}
- else if (stat == 0) {
+ else if (status == 0) {
return APR_CHILD_NOTDONE;
}
return errno;
}
- if ((stat = waitpid(proc->pid, NULL, WUNTRACED | WNOHANG)) > 0) {
+ if ((status = waitpid(proc->pid, NULL, WUNTRACED | WNOHANG)) > 0) {
return APR_CHILD_DONE;
}
- else if (stat == 0) {
+ else if (status == 0) {
return APR_CHILD_NOTDONE;
}
return errno;
1.2 +2 -2 apache-2.0/src/lib/apr/threadproc/unix/signals.c
Index: signals.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/unix/signals.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- signals.c 1999/08/17 15:59:50 1.1
+++ signals.c 1999/10/01 16:18:37 1.2
@@ -62,9 +62,9 @@
#include <string.h>
#include <sys/wait.h>
-ap_status_t ap_kill(struct proc_t *proc, int signal)
+ap_status_t ap_kill(struct proc_t *proc, int sig)
{
- if (kill(proc->pid, signal) == -1) {
+ if (kill(proc->pid, sig) == -1) {
return errno;
}
return APR_SUCCESS;
1.3 +66 -66 apache-2.0/src/lib/apr/time/unix/access.c
Index: access.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/time/unix/access.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- access.c 1999/09/14 13:37:37 1.2
+++ access.c 1999/10/01 16:18:40 1.3
@@ -66,10 +66,10 @@
* arg 1) The time value we care about.
* arg 2) Integer to store time value in
*/
-ap_status_t ap_get_curtime(struct atime_t *time, ap_int64_t *rv)
+ap_status_t ap_get_curtime(struct atime_t *atime, ap_int64_t *rv)
{
- if (time) {
- (*rv) = time->currtime->tv_sec;
+ if (atime) {
+ (*rv) = atime->currtime->tv_sec;
return APR_SUCCESS;
}
return APR_ENOTIME;
@@ -81,10 +81,10 @@
* arg 1) The time value we care about.
* arg 2) Integer to store time value in
*/
-ap_status_t ap_get_sec(struct atime_t *time, ap_int32_t *rv)
+ap_status_t ap_get_sec(struct atime_t *atime, ap_int32_t *rv)
{
- if (time) {
- (*rv) = time->explodedtime->tm_sec;
+ if (atime) {
+ (*rv) = atime->explodedtime->tm_sec;
return APR_SUCCESS;
}
return APR_ENOTIME;
@@ -96,10 +96,10 @@
* arg 1) The time value we care about.
* arg 2) Integer to store time value in
*/
-ap_status_t ap_get_min(struct atime_t *time, ap_int32_t *rv)
+ap_status_t ap_get_min(struct atime_t *atime, ap_int32_t *rv)
{
- if (time) {
- (*rv) = time->explodedtime->tm_min;
+ if (atime) {
+ (*rv) = atime->explodedtime->tm_min;
return APR_SUCCESS;
}
return APR_ENOTIME;
@@ -111,10 +111,10 @@
* arg 1) The time value we care about.
* arg 2) Integer to store time value in
*/
-ap_status_t ap_get_hour(struct atime_t *time, ap_int32_t *rv)
+ap_status_t ap_get_hour(struct atime_t *atime, ap_int32_t *rv)
{
- if (time) {
- (*rv) = time->explodedtime->tm_hour;
+ if (atime) {
+ (*rv) = atime->explodedtime->tm_hour;
return APR_SUCCESS;
}
return APR_ENOTIME;
@@ -126,10 +126,10 @@
* arg 1) The time value we care about.
* arg 2) Integer to store time value in
*/
-ap_status_t ap_get_mday(struct atime_t *time, ap_int32_t *rv)
+ap_status_t ap_get_mday(struct atime_t *atime, ap_int32_t *rv)
{
- if (time) {
- (*rv) = time->explodedtime->tm_mday;
+ if (atime) {
+ (*rv) = atime->explodedtime->tm_mday;
return APR_SUCCESS;
}
return APR_ENOTIME;
@@ -141,10 +141,10 @@
* arg 1) The time value we care about.
* arg 2) Integer to store time value in
*/
-ap_status_t ap_get_mon(struct atime_t *time, ap_int32_t *rv)
+ap_status_t ap_get_mon(struct atime_t *atime, ap_int32_t *rv)
{
- if (time) {
- (*rv) = time->explodedtime->tm_mon;
+ if (atime) {
+ (*rv) = atime->explodedtime->tm_mon;
return APR_SUCCESS;
}
return APR_ENOTIME;
@@ -156,10 +156,10 @@
* arg 1) The time value we care about.
* arg 2) Integer to store time value in
*/
-ap_status_t ap_get_year(struct atime_t *time, ap_int32_t *rv)
+ap_status_t ap_get_year(struct atime_t *atime, ap_int32_t *rv)
{
- if (time) {
- (*rv) = time->explodedtime->tm_year;
+ if (atime) {
+ (*rv) = atime->explodedtime->tm_year;
return APR_SUCCESS;
}
return APR_ENOTIME;
@@ -171,10 +171,10 @@
* arg 1) The time value we care about.
* arg 2) Integer to store time value in
*/
-ap_status_t ap_get_wday(struct atime_t *time, ap_int32_t *rv)
+ap_status_t ap_get_wday(struct atime_t *atime, ap_int32_t *rv)
{
- if (time) {
- (*rv) = time->explodedtime->tm_wday;
+ if (atime) {
+ (*rv) = atime->explodedtime->tm_wday;
return APR_SUCCESS;
}
return APR_ENOTIME;
@@ -186,19 +186,19 @@
* arg 1) The time value we care about.
* arg 2) Integer to store time value in
*/
-ap_status_t ap_set_sec(struct atime_t *time, ap_int32_t value)
+ap_status_t ap_set_sec(struct atime_t *atime, ap_int32_t value)
{
- if (!time) {
+ if (!atime) {
return APR_ENOTIME;
}
- if (time->explodedtime == NULL) {
- time->explodedtime = (struct tm *)ap_palloc(time->cntxt,
+ if (atime->explodedtime == NULL) {
+ atime->explodedtime = (struct tm *)ap_palloc(atime->cntxt,
sizeof(struct tm));
}
- if (time->explodedtime == NULL) {
+ if (atime->explodedtime == NULL) {
return APR_ENOMEM;
}
- time->explodedtime->tm_sec = value;
+ atime->explodedtime->tm_sec = value;
return APR_SUCCESS;
}
@@ -208,19 +208,19 @@
* arg 1) The time value we care about.
* arg 2) Integer to store time value in
*/
-ap_status_t ap_set_min(struct atime_t *time, ap_int32_t value)
+ap_status_t ap_set_min(struct atime_t *atime, ap_int32_t value)
{
- if (!time) {
+ if (!atime) {
return APR_ENOTIME;
}
- if (time->explodedtime == NULL) {
- time->explodedtime = (struct tm *)ap_palloc(time->cntxt,
+ if (atime->explodedtime == NULL) {
+ atime->explodedtime = (struct tm *)ap_palloc(atime->cntxt,
sizeof(struct tm));
}
- if (time->explodedtime == NULL) {
+ if (atime->explodedtime == NULL) {
return APR_ENOMEM;
}
- time->explodedtime->tm_min = value;
+ atime->explodedtime->tm_min = value;
return APR_SUCCESS;
}
@@ -230,19 +230,19 @@
* arg 1) The time value we care about.
* arg 2) Integer to store time value in
*/
-ap_status_t ap_set_hour(struct atime_t *time, ap_int32_t value)
+ap_status_t ap_set_hour(struct atime_t *atime, ap_int32_t value)
{
- if (!time) {
+ if (!atime) {
return APR_ENOTIME;
}
- if (time->explodedtime == NULL) {
- time->explodedtime = (struct tm *)ap_palloc(time->cntxt,
+ if (atime->explodedtime == NULL) {
+ atime->explodedtime = (struct tm *)ap_palloc(atime->cntxt,
sizeof(struct tm));
}
- if (time->explodedtime == NULL) {
+ if (atime->explodedtime == NULL) {
return APR_ENOMEM;
}
- time->explodedtime->tm_hour = value;
+ atime->explodedtime->tm_hour = value;
return APR_SUCCESS;
}
@@ -252,19 +252,19 @@
* arg 1) The time value we care about.
* arg 2) Integer to store time value in
*/
-ap_status_t ap_set_mday(struct atime_t *time, ap_int32_t value)
+ap_status_t ap_set_mday(struct atime_t *atime, ap_int32_t value)
{
- if (!time) {
+ if (!atime) {
return APR_ENOTIME;
}
- if (time->explodedtime == NULL) {
- time->explodedtime = (struct tm *)ap_palloc(time->cntxt,
+ if (atime->explodedtime == NULL) {
+ atime->explodedtime = (struct tm *)ap_palloc(atime->cntxt,
sizeof(struct tm));
}
- if (time->explodedtime == NULL) {
+ if (atime->explodedtime == NULL) {
return APR_ENOMEM;
}
- time->explodedtime->tm_mday = value;
+ atime->explodedtime->tm_mday = value;
return APR_SUCCESS;
}
@@ -274,19 +274,19 @@
* arg 1) The time value we care about.
* arg 2) Integer to store time value in
*/
-ap_status_t ap_set_mon(struct atime_t *time, ap_int32_t value)
+ap_status_t ap_set_mon(struct atime_t *atime, ap_int32_t value)
{
- if (!time) {
+ if (!atime) {
return APR_ENOTIME;
}
- if (time->explodedtime == NULL) {
- time->explodedtime = (struct tm *)ap_palloc(time->cntxt,
+ if (atime->explodedtime == NULL) {
+ atime->explodedtime = (struct tm *)ap_palloc(atime->cntxt,
sizeof(struct tm));
}
- if (time->explodedtime == NULL) {
+ if (atime->explodedtime == NULL) {
return APR_ENOMEM;
}
- time->explodedtime->tm_mon = value;
+ atime->explodedtime->tm_mon = value;
return APR_SUCCESS;
}
@@ -296,19 +296,19 @@
* arg 1) The time value we care about.
* arg 2) Integer to store time value in
*/
-ap_status_t ap_set_year(struct atime_t *time, ap_int32_t value)
+ap_status_t ap_set_year(struct atime_t *atime, ap_int32_t value)
{
- if (!time) {
+ if (!atime) {
return APR_ENOTIME;
}
- if (time->explodedtime == NULL) {
- time->explodedtime = (struct tm *)ap_palloc(time->cntxt,
+ if (atime->explodedtime == NULL) {
+ atime->explodedtime = (struct tm *)ap_palloc(atime->cntxt,
sizeof(struct tm));
}
- if (time->explodedtime == NULL) {
+ if (atime->explodedtime == NULL) {
return APR_ENOMEM;
}
- time->explodedtime->tm_year = value;
+ atime->explodedtime->tm_year = value;
return APR_SUCCESS;
}
@@ -318,19 +318,19 @@
* arg 1) The time value we care about.
* arg 2) Integer to store time value in
*/
-ap_status_t ap_set_wday(struct atime_t *time, ap_int32_t value)
+ap_status_t ap_set_wday(struct atime_t *atime, ap_int32_t value)
{
- if (!time) {
+ if (!atime) {
return APR_ENOTIME;
}
- if (time->explodedtime == NULL) {
- time->explodedtime = (struct tm *)ap_palloc(time->cntxt,
+ if (atime->explodedtime == NULL) {
+ atime->explodedtime = (struct tm *)ap_palloc(atime->cntxt,
sizeof(struct tm));
}
- if (time->explodedtime == NULL) {
+ if (atime->explodedtime == NULL) {
return APR_ENOMEM;
}
- time->explodedtime->tm_wday = value;
+ atime->explodedtime->tm_wday = value;
return APR_SUCCESS;
}