|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-06-13 10:01 UTC] rasmus@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 14:00:01 2025 UTC |
Description: ------------ php_apc.c: In function `_apc_store': php_apc.c:365: warning: 't' might be used uninitialized in this function suggested fix: Index: php_apc.c =================================================================== RCS file: /repository/pecl/apc/php_apc.c,v retrieving revision 3.43 diff -u -r3.43 php_apc.c --- php_apc.c 8 Apr 2005 20:25:38 -0000 3.43 +++ php_apc.c 13 Jun 2005 12:36:14 -0000 @@ -348,12 +348,6 @@ apc_cache_key_t key; time_t t; - if (!(entry = apc_cache_make_user_entry(strkey, val, ttl))) { - apc_cache_expunge(APCG(cache),t); - apc_cache_expunge(APCG(user_cache),t); - return 0; - } - #if HAVE_APACHE /* Save a syscall here under Apache. This should actually be a SAPI call instead * but we don't have that yet. Once that is introduced in PHP this can be cleaned up -Rasmus */ @@ -362,6 +356,12 @@ t = time(0); #endif + if (!(entry = apc_cache_make_user_entry(strkey, val, ttl))) { + apc_cache_expunge(APCG(cache),t); + apc_cache_expunge(APCG(user_cache),t); + return 0; + } + if (!apc_cache_make_user_key(&key, strkey, t)) { apc_cache_free_entry(entry); apc_cache_expunge(APCG(cache),t); Reproduce code: --------------- introduced in: http://cvs.php.net/diff.php/pecl/apc/php_apc.c?r1=3.41&r2=3.42&ty=h