r14132: Fix Coverity bug # 150.
authorVolker Lendecke <vlendec@samba.org>
Fri, 10 Mar 2006 08:53:15 +0000 (08:53 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:15:12 +0000 (11:15 -0500)
Jerry, you might want to check this.

Thanks

Volker
(This used to be commit 9ec671c2f8547482ed08eb17a0fb771ef8fd1e51)

source3/services/services_db.c

index 6c38c6ed0a9ea2238833afa7a8e79fbf4433c48a..5b4f58d766dd1771eb9aaff600a738684cef85c3 100644 (file)
@@ -160,7 +160,7 @@ static char* cleanup_string( const char *string )
        while ( isspace(*begin) )
                begin++;
 
-       if ( !begin )
+       if ( *begin == '\0' )
                return NULL;
                        
        /* trim any trailing whitespace or carriage returns.