Date: Thu, 19 Sep 2013 20:32:56 GMT From: mattbw@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r257513 - in soc2013/mattbw/backend: actions jobs Message-ID: <201309192032.r8JKWupu016435@socsvn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mattbw Date: Thu Sep 19 20:32:56 2013 New Revision: 257513 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=257513 Log: Do some indent()ing; I accidentally committed from the wrong directory last time. Added: soc2013/mattbw/backend/jobs/.indent.pro Modified: soc2013/mattbw/backend/actions/get_details.c soc2013/mattbw/backend/actions/get_files.c soc2013/mattbw/backend/actions/get_update_detail.c soc2013/mattbw/backend/actions/install_files.c soc2013/mattbw/backend/actions/remove_packages.c soc2013/mattbw/backend/actions/search_files.c soc2013/mattbw/backend/actions/search_groups.c soc2013/mattbw/backend/actions/search_names.c soc2013/mattbw/backend/actions/update_system.c Modified: soc2013/mattbw/backend/actions/get_details.c ============================================================================== --- soc2013/mattbw/backend/actions/get_details.c Thu Sep 19 20:32:36 2013 (r257512) +++ soc2013/mattbw/backend/actions/get_details.c Thu Sep 19 20:32:56 2013 (r257513) @@ -60,7 +60,7 @@ bool success; const char *description; const char *www; - gchar *id; + gchar *id; int64_t flatsize; guint flatsize_u; @@ -76,7 +76,7 @@ PKG_FLATSIZE, &flatsize, PKG_WWW, &www); - flatsize_u = (guint)CLAMP(flatsize, 0, G_MAXUINT); + flatsize_u = (guint) CLAMP(flatsize, 0, G_MAXUINT); id = pkgutils_pkg_to_id(pkg); Modified: soc2013/mattbw/backend/actions/get_files.c ============================================================================== --- soc2013/mattbw/backend/actions/get_files.c Thu Sep 19 20:32:36 2013 (r257512) +++ soc2013/mattbw/backend/actions/get_files.c Thu Sep 19 20:32:56 2013 (r257513) @@ -84,7 +84,7 @@ "couldn't construct filename string"); else { char *filenames; - gchar *id; + gchar *id; filenames = sbuf_data(sb); /* Skip over any initial ; */ Modified: soc2013/mattbw/backend/actions/get_update_detail.c ============================================================================== --- soc2013/mattbw/backend/actions/get_update_detail.c Thu Sep 19 20:32:36 2013 (r257512) +++ soc2013/mattbw/backend/actions/get_update_detail.c Thu Sep 19 20:32:56 2013 (r257513) @@ -61,8 +61,8 @@ pkgutils_add_old_version(db, pkg, &old); if (old != NULL && pkg_version_change(pkg) == PKG_UPGRADE) { const char *update_text; - gchar *new_id; - gchar *old_id; + gchar *new_id; + gchar *old_id; new_id = pkgutils_pkg_to_id(pkg); old_id = pkgutils_pkg_to_id(old); @@ -80,7 +80,6 @@ success = true; } - pkg_free(old); return success; Modified: soc2013/mattbw/backend/actions/install_files.c ============================================================================== --- soc2013/mattbw/backend/actions/install_files.c Thu Sep 19 20:32:36 2013 (r257512) +++ soc2013/mattbw/backend/actions/install_files.c Thu Sep 19 20:32:56 2013 (r257513) @@ -63,7 +63,7 @@ gboolean success; struct pkg *pkg; struct pkg_manifest_key *keys; - struct pkgdb *db; + struct pkgdb *db; success = FALSE; pkg = NULL; @@ -99,7 +99,6 @@ "could not install file"); goto cleanup; } - success = TRUE; } @@ -132,7 +131,7 @@ PK_ERROR_ENUM_INTERNAL_ERROR, "path vector is empty"); else { - gchar **p; + gchar **p; for (p = paths, success = TRUE; (*p != NULL) && success == TRUE; Modified: soc2013/mattbw/backend/actions/remove_packages.c ============================================================================== --- soc2013/mattbw/backend/actions/remove_packages.c Thu Sep 19 20:32:36 2013 (r257512) +++ soc2013/mattbw/backend/actions/remove_packages.c Thu Sep 19 20:32:56 2013 (r257513) @@ -31,8 +31,8 @@ static gboolean remove_packages(PkBackend *backend, bool simulate); /* - * The thread that performs an removePackages operation. Should be invoked - * by the pk_backend_remove_packages hook. + * The thread that performs an removePackages operation. Should be invoked by + * the pk_backend_remove_packages hook. */ gboolean remove_packages_thread(PkBackend *backend) Modified: soc2013/mattbw/backend/actions/search_files.c ============================================================================== --- soc2013/mattbw/backend/actions/search_files.c Thu Sep 19 20:32:36 2013 (r257512) +++ soc2013/mattbw/backend/actions/search_files.c Thu Sep 19 20:32:56 2013 (r257513) @@ -42,7 +42,7 @@ struct pkg *pkg; struct pkgdb *db; struct pkgdb_it *it; - gchar **filev; + gchar **filev; assert(backend != NULL); db = NULL; @@ -67,7 +67,6 @@ ERR(backend, PK_ERROR_ENUM_INTERNAL_ERROR, "no files given"); goto cleanup; } - for (i = 0; i < filec; i++) { at_least_one = false; @@ -75,14 +74,13 @@ if (it != NULL) { while (pkgdb_it_next(it, &pkg, PKG_LOAD_BASIC) == EPKG_OK) { - assert(pkg != NULL); + assert(pkg != NULL); emit_package(pkg, backend, - pkgutils_pkg_current_state(pkg)); + pkgutils_pkg_current_state(pkg)); at_least_one = true; } } - /* TODO: specifically name file? */ if (at_least_one == false) ERR(backend, PK_ERROR_ENUM_PACKAGE_NOT_FOUND, Modified: soc2013/mattbw/backend/actions/search_groups.c ============================================================================== --- soc2013/mattbw/backend/actions/search_groups.c Thu Sep 19 20:32:36 2013 (r257512) +++ soc2013/mattbw/backend/actions/search_groups.c Thu Sep 19 20:32:56 2013 (r257513) @@ -63,19 +63,16 @@ ERR(backend, PK_ERROR_ENUM_INTERNAL_ERROR, "search was NULL"); goto cleanup; } - groupc = g_strv_length(values); if (groupc == 0) { ERR(backend, PK_ERROR_ENUM_INTERNAL_ERROR, "no values"); goto cleanup; } - groupv = calloc(groupc, sizeof(PkGroupEnum)); if (groupv == NULL) { ERR(backend, PK_ERROR_ENUM_OOM, "couldn't alloc groupv"); goto cleanup; } - for (i = 0; i < groupc; i++) { groupv[i] = pk_group_enum_from_string(values[i]); if (groupv[i] == PK_GROUP_ENUM_UNKNOWN) @@ -87,7 +84,6 @@ ERR(backend, PK_ERROR_ENUM_INTERNAL_ERROR, "no search.term"); goto cleanup; } - search.type = MATCH_REGEX; search.in = FIELD_ORIGIN; search.sort_by = FIELD_ORIGIN; Modified: soc2013/mattbw/backend/actions/search_names.c ============================================================================== --- soc2013/mattbw/backend/actions/search_names.c Thu Sep 19 20:32:36 2013 (r257512) +++ soc2013/mattbw/backend/actions/search_names.c Thu Sep 19 20:32:56 2013 (r257513) @@ -69,7 +69,6 @@ ((i + 1) * 100) / len); } } - pkgdb_close(search.db); (void)pk_backend_set_percentage(backend, 100); (void)pk_backend_finished(backend); Modified: soc2013/mattbw/backend/actions/update_system.c ============================================================================== --- soc2013/mattbw/backend/actions/update_system.c Thu Sep 19 20:32:36 2013 (r257512) +++ soc2013/mattbw/backend/actions/update_system.c Thu Sep 19 20:32:56 2013 (r257513) @@ -29,8 +29,8 @@ #include "../pkgutils.h" /* pkgutils_... */ /* - * The thread that performs an UpdateSystem operation. Should be invoked - * by the pk_backend_update_system hook. + * The thread that performs an UpdateSystem operation. Should be invoked by + * the pk_backend_update_system hook. */ gboolean update_system_thread(PkBackend *backend) Added: soc2013/mattbw/backend/jobs/.indent.pro ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2013/mattbw/backend/jobs/.indent.pro Thu Sep 19 20:32:56 2013 (r257513) @@ -0,0 +1,7 @@ +-TPkBackend +-Tgchar +-Tgboolean +-Tbool +-sob +-nlp +-ci4
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309192032.r8JKWupu016435>