Bug #68823 [Opn->Csd]: Useles check
| From: | carusogabriel@php.net | Date: | Sun, 05 Aug 2018 04:00:02 +0000 |
| Subject: | Bug #68823 [Opn->Csd]: Useles check | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-216594@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
Updated by: carusogabriel@php.net
Reported by: bugreports at internot dot info
Summary: Useles check
-Status: Open
+Status: Closed
Type: Bug
Package: *General Issues
Operating System: Linux Ubuntu 14.04
PHP Version: master-Git-2015-01-13 (Git)
-Assigned To:
+Assigned To: carusogabriel
Block user comment: N
Private report: N
New Comment:
Closing as phpmpan said, it has the
char * type and can be null: P_tmpdir
has type char*: <https://www.gnu.org/software/libc/manual/html_node/Temporary-Files.html>.
Previous Comments:
------------------------------------------------------------------------
[2015-01-13 19:15:40] phpmpan at mpan dot pl
P_tmpdir has type char*: <https://www.gnu.org/software/libc/manual/html_node/Temporary-Files.html>.
------------------------------------------------------------------------
[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