File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -318,15 +318,17 @@ DBA_SYNC_FUNC(cdb)
318318DBA_INFO_FUNC (cdb )
319319{
320320#ifdef DBA_CDB_BUILTIN
321- char * version_str = NULL ;
321+ const char * version_str ;
322+
322323 if (!strcmp (hnd -> name , "cdb" )) {
323- version_str = ( char * ) cdb_version ();
324+ version_str = cdb_version ();
324325 } else {
325- version_str = ( char * ) cdb_make_version ();
326+ version_str = cdb_make_version ();
326327 }
327- return zend_string_init (cdb_version , strlen (cdb_version ), false);
328+
329+ return zend_string_init (version_str , strlen (version_str ), 0 );
328330#else
329- return zend_string_init ("External" , strlen ("External" ), false );
331+ return zend_string_init ("External" , sizeof ("External" ) - 1 , 0 );
330332#endif
331333}
332334
Original file line number Diff line number Diff line change @@ -188,7 +188,7 @@ DBA_INFO_FUNC(dbm)
188188{
189189#ifdef DBA_GDBM
190190 if (!strcmp (DBM_VERSION , "GDBM" ))
191- {
191+ {
192192 return dba_info_gdbm (hnd , info );
193193 }
194194#endif
Original file line number Diff line number Diff line change @@ -167,7 +167,7 @@ DBA_SYNC_FUNC(flatfile)
167167
168168DBA_INFO_FUNC (flatfile )
169169{
170- char * version = flatfile_version ();
170+ const char * version = flatfile_version ();
171171 return zend_string_init (version , strlen (version ), false);
172172}
173173
You can’t perform that action at this time.
0 commit comments