Sign in
plan9port
/
plan9
/
009b0cb5eb340b8bc3268bfaeb86abfeffdc1b1c
/
.
/
src
/
libString
/
s_unique.c
blob: 134411c92ecdcebecc3c2c82649c23baa232fd2f [
file
] [
log
] [
blame
]
#include
<u.h>
#include
<libc.h>
#include
"libString.h"
String
*
s_unique
(
String
*
s
)
{
String
*
p
;
if
(
s
->
ref
>
1
){
p
=
s
;
s
=
s_clone
(
p
);
s_free
(
p
);
}
return
s
;
}