Bug #68823 [Com]: Useles check
| From: | phpmpan at mpan dot pl | Date: | Tue, 13 Jan 2015 19:15:40 +0000 |
| Subject: | Bug #68823 [Com]: Useles check | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-189940@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=68823&edit=1
ID: 68823
Comment by: phpmpan at mpan dot pl
Reported by: bugreports at internot dot info
Summary: Useles check
Status: Open
Type: Bug
Package: *General Issues
Operating System: Linux Ubuntu 14.04
PHP Version: master-Git-2015-01-13 (Git)
Block user comment: N
Private report: N
New Comment:
P_tmpdir has type char*: <https://www.gnu.org/software/libc/manual/html_node/Temporary-Files.html>.
Previous Comments:
------------------------------------------------------------------------
[2015-01-13 05:12:26] bugreports at internot dot info
Description:
------------
Hi,
In /main/php_open_temporary_file.c:
247#ifdef P_tmpdir
248 /* Use the standard default temporary directory. */
249 if (P_tmpdir) {
250 temporary_directory = strdup(P_tmpdir);
251 return temporary_directory;
252 }
253#endif
249 if (P_tmpdir) {
is useless due to 2 reasons:
1. it's an array, and cannot be NULL.
2. the check at line 247 should be fine as it is.
Thanks,
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=68823&edit=1