- Jul 09, 2021
-
-
Heinrich Schuchardt authored
uri_free() checks if its argument is NULL in uri_clean() and g_free(). There is no need to check the argument before the call. Signed-off-by:
Heinrich Schuchardt <xypron.glpk@gmx.de> Message-Id: <20210629063602.4239-1-xypron.glpk@gmx.de> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Richard W.M. Jones <rjones@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
- Jun 29, 2018
-
-
Keno Fischer authored
strchrnul is a GNU extension and thus unavailable on a number of targets. In the review for a commit removing strchrnul from 9p, I was asked to create a qemu_strchrnul helper to factor out this functionality. Do so, and use it in a number of other places in the code base that inlined the replacement pattern in a place where strchrnul could be used. Signed-off-by:
Keno Fischer <keno@juliacomputing.com> Acked-by:
Greg Kurz <groug@kaod.org> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Greg Kurz <groug@kaod.org>
-
- May 20, 2018
-
-
Laurent Vivier authored
Re-run Coccinelle script scripts/coccinelle/return_directly.cocci Signed-off-by:
Laurent Vivier <lvivier@redhat.com> ppc part Acked-by:
David Gibson <david@gibson.dropbear.id.au> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
- Mar 05, 2018
-
-
Su Hang authored
For this patch, using curly braces to wrap `if` `while` `else` statements, which only hold single statement. For example: ''' if (cond) statement; ''' to ''' if (cond) { statement; } ''' And using tricks that compare the disassemblies before and after code changes, to make sure code logic isn't changed: ''' git checkout master make util/uri.o strip util/uri.o objdump -Drx util/uri.o > /tmp/uri-master.txt git checkout cleanupbranch make util/uri.o strip util/uri.o objdump -Drx util/uri.o > /tmp/uri-cleanup.txt Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Su Hang authored
only remove brackets that wrap `return` statements' content. use `perl -pi -e "s/return \((.*?)\);/return \1;/g" util/uri.c` to remove pattern like this: "return (1);" Signed-off-by:
Su Hang <suhang16@mails.ucas.ac.cn> Reviewed-by:
Thomas Huth <thuth@redhat.com> Message-id: 1519533358-13759-3-git-send-email-suhang16@mails.ucas.ac.cn Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Su Hang authored
Using `clang-format -i util/uri.c` first, then change back few code manually, to make sure only whitespace involved. Signed-off-by:
Su Hang <suhang16@mails.ucas.ac.cn> Reviewed-by:
Thomas Huth <thuth@redhat.com> Message-id: 1519533358-13759-2-git-send-email-suhang16@mails.ucas.ac.cn Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Jan 24, 2017
-
-
Stefan Weil authored
Signed-off-by:
Stefan Weil <sw@weilnetz.de> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
- Jun 07, 2016
-
-
Peter Maydell authored
Remove glib.h includes, as it is provided by osdep.h. This commit was created with scripts/clean-includes. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Eric Blake <eblake@redhat.com> Tested-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
- Feb 04, 2016
-
-
Peter Maydell authored
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Message-id: 1454089805-5470-6-git-send-email-peter.maydell@linaro.org
-
- Mar 18, 2015
-
-
Hanna Reitz authored
And while at it, replace tabs by eight spaces in this function. Signed-off-by:
Max Reitz <mreitz@redhat.com> Message-Id: <1424887718-10800-2-git-send-email-mreitz@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Feb 10, 2015
-
-
Markus Armbruster authored
uri_resolve_relative() calls strcmp(bas->path, ref->path). However, either argument could be null! Evidence: the code checks for null after the comparison. Spotted by Coverity. I suspect this was screwed up when we stole the code from libxml2. There the conditional reads xmlStrEqual((xmlChar *)bas->path, (xmlChar *)ref->path) with int xmlStrEqual(const xmlChar *str1, const xmlChar *str2) { if (str1 == str2) return(1); if (str1 == NULL) return(0); if (str2 == NULL) return(0); do { if (*str1++ != *str2) return(0); } while (*str2++); return(1); } Fix by replicating libxml2's logic faithfully. Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
Markus Armbruster authored
Signed-off-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
Markus Armbruster authored
Signed-off-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
- Dec 10, 2014
-
-
Markus Armbruster authored
Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Fam Zheng <famz@redhat.com> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
Markus Armbruster authored
Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Fam Zheng <famz@redhat.com> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
Markus Armbruster authored
Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Fam Zheng <famz@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
- May 12, 2013
-
-
Dong Xu Wang authored
Signed-off-by:
Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
- Jan 12, 2013
-
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Dec 19, 2012
-
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Dec 07, 2012
-
-
Stefan Weil authored
Remove also a duplicated 'the'. Signed-off-by:
Stefan Weil <sw@weilnetz.de> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Sep 28, 2012
-
-
Paolo Bonzini authored
Add a new URI parsing library to QEMU. The code has been borrowed from libxml2 and libvirt. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Bharata B Rao <bharata@linux.vnet.ibm.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-