]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
virSysinfoParseProcessor: Drop useless check for NULL
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 12 May 2015 15:49:59 +0000 (17:49 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 13 May 2015 08:17:45 +0000 (10:17 +0200)
VIR_STRDUP plays nicely with NULLs. Theres no need to guard its
call with check for non-NULL.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/util/virsysinfo.c

index 4edce66a6bae13fda7a7607dce74a7dab108bea7..8bb17f07badc956e985978cc951aecdd64e6081d 100644 (file)
@@ -315,8 +315,7 @@ virSysinfoParseProcessor(const char *base, virSysinfoDefPtr ret)
                         cur, eol - cur) < 0)
             goto error;
 
-        if (processor_type &&
-            VIR_STRDUP(processor->processor_type, processor_type) < 0)
+        if (VIR_STRDUP(processor->processor_type, processor_type) < 0)
             goto error;
 
         base = cur;