mirror of
https://github.com/labwc/labwc.git
synced 2026-03-04 01:40:39 -05: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/buf.h"
|
||||||
#include "common/macros.h"
|
#include "common/macros.h"
|
||||||
#include "common/mem.h"
|
#include "common/mem.h"
|
||||||
|
#include "common/string-helpers.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
buf_expand_tilde(struct buf *s)
|
buf_expand_tilde(struct buf *s)
|
||||||
|
|
@ -97,7 +98,7 @@ buf_expand(struct buf *s, int new_alloc)
|
||||||
void
|
void
|
||||||
buf_add(struct buf *s, const char *data)
|
buf_add(struct buf *s, const char *data)
|
||||||
{
|
{
|
||||||
if (!data || data[0] == '\0') {
|
if (string_null_or_empty(data)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int len = strlen(data);
|
int len = strlen(data);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue