mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-21 03:13:42 +08:00
Fix missing return statement identified by lgtm
This commit is contained in:
parent
ee0086f16a
commit
867e51145b
@ -57,13 +57,15 @@ chkrealloc(void* ptr, size_t size)
|
|||||||
char*
|
char*
|
||||||
chkstrdup(const char* s)
|
chkstrdup(const char* s)
|
||||||
{
|
{
|
||||||
char* dup = strdup(s);
|
char* dup;
|
||||||
if(s == NULL) {
|
if(s == NULL) {
|
||||||
panic("strdup: null argument");
|
panic("strdup: null argument");
|
||||||
}
|
}
|
||||||
|
dup = strdup(s);
|
||||||
if(dup == NULL) {
|
if(dup == NULL) {
|
||||||
panic("strdup: out of memory");
|
panic("strdup: out of memory");
|
||||||
}
|
}
|
||||||
|
return dup;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
Loading…
Reference in New Issue
Block a user