mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
common/buf: use string_null_or_empty()
This commit is contained in:
parent
0573f16693
commit
fccc6a2922
1 changed files with 2 additions and 1 deletions
|
|
@ -6,6 +6,7 @@
|
|||
#include "common/buf.h"
|
||||
#include "common/macros.h"
|
||||
#include "common/mem.h"
|
||||
#include "common/string-helpers.h"
|
||||
|
||||
void
|
||||
buf_expand_tilde(struct buf *s)
|
||||
|
|
@ -97,7 +98,7 @@ buf_expand(struct buf *s, int new_alloc)
|
|||
void
|
||||
buf_add(struct buf *s, const char *data)
|
||||
{
|
||||
if (!data || data[0] == '\0') {
|
||||
if (string_null_or_empty(data)) {
|
||||
return;
|
||||
}
|
||||
int len = strlen(data);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue