]> granicus.if.org Git - apache/commitdiff
struct_ptr is a void*. The Windows compiler doesn't like it when you try
authorBill Stoddard <stoddard@apache.org>
Fri, 20 Apr 2001 19:11:21 +0000 (19:11 +0000)
committerBill Stoddard <stoddard@apache.org>
Fri, 20 Apr 2001 19:11:21 +0000 (19:11 +0000)
to do pointer math on a void*.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88905 13f79535-47bb-0310-9956-ffa450edef68

server/config.c

index 52fe13ede125eb96a25a324ac2294ce17ee8526c..689b3477779688e64fad2d5e8050ffdb5839d9a6 100644 (file)
@@ -1069,7 +1069,7 @@ AP_DECLARE_NONSTD(const char *) ap_set_int_slot(cmd_parms *cmd,
     char *error_str = NULL;
     int offset = (int) (long) cmd->info;
 
-    *(int *) (struct_ptr + offset) = strtol(arg, &endptr, 10);
+    *(int *) ((char*)struct_ptr + offset) = strtol(arg, &endptr, 10);
 
     if ((*arg == '\0') || (*endptr != '\0')) {
         error_str = apr_psprintf(cmd->pool,