sim-card
/
qemu
Archived
10
0
Fork 0

Remove useless NULL check for qemu_strdup return value

Found with this Coccinelle semantic patch:
@@
expression E;
identifier ptr;
identifier fn ~= "qemu_strn?dup";
@@

-ptr = fn(E);
-if (ptr == NULL) { ... }
-
+ptr = fn(E);

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
Blue Swirl 2010-08-19 20:24:43 +00:00
parent 8e00128d32
commit f143efa60c
1 changed files with 0 additions and 3 deletions

View File

@ -426,9 +426,6 @@ static int local_rename(FsContext *ctx, const char *oldpath,
int err;
tmp = qemu_strdup(rpath(ctx, oldpath));
if (tmp == NULL) {
return -1;
}
err = rename(tmp, rpath(ctx, newpath));
if (err == -1) {