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*
|
||||
chkstrdup(const char* s)
|
||||
{
|
||||
char* dup = strdup(s);
|
||||
char* dup;
|
||||
if(s == NULL) {
|
||||
panic("strdup: null argument");
|
||||
}
|
||||
dup = strdup(s);
|
||||
if(dup == NULL) {
|
||||
panic("strdup: out of memory");
|
||||
}
|
||||
return dup;
|
||||
}
|
||||
|
||||
int
|
||||
|
Loading…
Reference in New Issue
Block a user