Skip to content

Commit

Permalink
add nodata error when updateinfo has no results
Browse files Browse the repository at this point in the history
  • Loading branch information
Priyesh Padmavilasom committed May 20, 2016
1 parent ba755ef commit 6924599
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions client/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,12 @@ TDNFUpdateInfo(
hAdvList = NULL;
}

if(!pUpdateInfos)
{
dwError = ERROR_TDNF_NO_DATA;
BAIL_ON_TDNF_ERROR(dwError);
}

*ppUpdateInfo = pUpdateInfos;

cleanup:
Expand Down
4 changes: 4 additions & 0 deletions tools/cli/updateinfocmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ TDNFCliUpdateInfoCommand(
return dwError;

error:
if(dwError == ERROR_TDNF_NO_DATA)
{
dwError = 0;
}
goto cleanup;
}

Expand Down

0 comments on commit 6924599

Please sign in to comment.