mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-18 10:51:40 +00:00
Add include/asterisk/utils.h file. Which includes the function
ast_strlen_zero, which should be used instead of strlen to check if a string has length or doesn't have length. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2868 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
20
include/asterisk/utils.h
Executable file
20
include/asterisk/utils.h
Executable file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Asterisk -- A telephony toolkit for Linux.
|
||||
*
|
||||
* Utility functions
|
||||
*
|
||||
* Copyright (C) 2004, Digium
|
||||
*
|
||||
* This program is free software, distributed under the terms of
|
||||
* the GNU General Public License
|
||||
*/
|
||||
|
||||
#ifndef _ASTERISK_UTIL_H
|
||||
#define _ASTERISK_UTIL_H
|
||||
|
||||
static inline int ast_strlen_zero(const char *s)
|
||||
{
|
||||
return (*s == '\0');
|
||||
}
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user