@@ -298,12 +298,6 @@ inline char *strncat(char *dst, const char *src, size_t n)
298
298
inline int strcmp (const char * s1 , const char * s2 )
299
299
{
300
300
__CPROVER_HIDE :;
301
- #if !defined(__linux__ ) || defined(__GLIBC__ )
302
- if (s1 != 0 && s1 == s2 ) return 0 ;
303
- #else
304
- // musl guarantees non-null of s1
305
- if (s1 == s2 ) return 0 ;
306
- #endif
307
301
#ifdef __CPROVER_STRING_ABSTRACTION
308
302
int retval ;
309
303
__CPROVER_assert (__CPROVER_is_zero_string (s1 ), "strcmp zero-termination of 1st argument" );
@@ -345,12 +339,6 @@ inline int strcmp(const char *s1, const char *s2)
345
339
inline int strcasecmp (const char * s1 , const char * s2 )
346
340
{
347
341
__CPROVER_HIDE :;
348
- #if !defined(__linux__ ) || defined(__GLIBC__ )
349
- if (s1 != 0 && s1 == s2 ) return 0 ;
350
- #else
351
- // musl guarantees non-null of s1
352
- if (s1 == s2 ) return 0 ;
353
- #endif
354
342
#ifdef __CPROVER_STRING_ABSTRACTION
355
343
int retval ;
356
344
__CPROVER_assert (__CPROVER_is_zero_string (s1 ), "strcasecmp zero-termination of 1st argument" );
@@ -395,12 +383,6 @@ inline int strcasecmp(const char *s1, const char *s2)
395
383
inline int strncmp (const char * s1 , const char * s2 , size_t n )
396
384
{
397
385
__CPROVER_HIDE :;
398
- #if !defined(__linux__ ) || defined(__GLIBC__ )
399
- if (s1 != 0 && s1 == s2 ) return 0 ;
400
- #else
401
- // musl guarantees non-null of s1
402
- if (s1 == s2 ) return 0 ;
403
- #endif
404
386
#ifdef __CPROVER_STRING_ABSTRACTION
405
387
__CPROVER_assert (__CPROVER_is_zero_string (s1 ) || __CPROVER_buffer_size (s1 )>=n , "strncmp zero-termination of 1st argument" );
406
388
__CPROVER_assert (__CPROVER_is_zero_string (s2 ) || __CPROVER_buffer_size (s2 )>=n , "strncmp zero-termination of 2nd argument" );
@@ -439,12 +421,6 @@ inline int strncmp(const char *s1, const char *s2, size_t n)
439
421
inline int strncasecmp (const char * s1 , const char * s2 , size_t n )
440
422
{
441
423
__CPROVER_HIDE :;
442
- #if !defined(__linux__ ) || defined(__GLIBC__ )
443
- if (s1 != 0 && s1 == s2 ) return 0 ;
444
- #else
445
- // musl guarantees non-null of s1
446
- if (s1 == s2 ) return 0 ;
447
- #endif
448
424
#ifdef __CPROVER_STRING_ABSTRACTION
449
425
int retval ;
450
426
__CPROVER_assert (__CPROVER_is_zero_string (s1 ), "strncasecmp zero-termination of 1st argument" );
0 commit comments